rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 334 forks source link

by-products are not moved correctly with leaf bundle and Hugo academic #500

Closed cderv closed 3 years ago

cderv commented 3 years ago

Found during my test of new dev version.

The files are supposed to move to content directory and then stay if leaf bundle if used, from what I understand https://github.com/rstudio/blogdown/blob/0e2e33f71adadf3d85aac4fa0fb23584721d4b75/R/render.R#L109-L125

This is not correctly done for hugo academic because I believe it support multilanguage and the files names are index.en.html for example. That means the ressource directory is index.en_files

I think the regex should be changed here: https://github.com/rstudio/blogdown/blob/0e2e33f71adadf3d85aac4fa0fb23584721d4b75/R/render.R#L122

Currently, even with blogdown.new_bundle = TRUE (the new default), files for a new post are still inside the static directory.

yihui commented 3 years ago

Good catch! Should be fixed now. Thanks!