Home Comments Thread
New Thread

1 Comment

giscus-bot giscus-bot 2022-12-17 04:31:44
Guest *Henning* @ 2018-10-17 01:26:54 originally posted:

What is the correct place to put _redirects in a bookdown-project?

When it's put, say, at the root of the project, how will bookdown know to include it in the_book-directory, which will be deployed to Netlify (and where the redirect information is needed)?

yihui yihui 2022-12-17 04:31:44

Bookdown does not recognize _redirects. You can put it anywhere, and use file.copy('path/to/_redirects', bookdown:::output_dirname(NULL)) to copy it to the output directory.

Originally posted on 2018-10-17 02:04:35

giscus-bot giscus-bot 2022-12-17 04:31:45
Guest *R.Andres Castaneda* @ 2019-06-13 10:49:32 originally posted:

I had the same problem. Working with blogdown and netlify, I placed the _redirects file in the static folder and it worked fine.

Sign in to join the discussion

Sign in with GitHub