Reputation: 31820
When I build my site using blogdown, the cached files from Rmd posts are copied across to the public directory. This is unnecessary, wastes space, and slows down the deployment.
I think I can use blogdown::build_site()
with the custom
argument to avoid this, if I provide my own custom
script. What should the custom script look like?
Upvotes: 2
Views: 256
Reputation: 30174
The build method is irrelevant, because it only defines the behavior of blogdown instead of Hugo. It is Hugo that copied your files to public/
. I have not documented it yet, but typically you want Hugo to ignore these files (like what I did in the default example):
ignoreFiles = ["\\.Rmd$", "_files$", "_cache$"]
This option is to be set in the config file (e.g. config.toml
).
Upvotes: 5