Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 40 million developers.Sign up
- Added a global option
blogdown.hugo.args, which should be a character vector with additional flags to be passed to the
hugosystem command via
hugo_build(). For example,
options(blogdown.hugo.args = '--minify')will use minification on the final rendered output. More available flags in the hugo documentation (thanks, @jozefhajnala, #382).
- Added a global option
blogdown.filename.pre_processor, which can be a function with a single argument (the post title) that returns a pre-processed string to be used to generate the post filename. For example, if you set
options(blogdown.filename.pre_processor = function(x) stringi::stri_trans_general(x, "any-latin; nfd; [:nonspacing mark:] remove; nfc")), Cyrillic characters in a post title can be converted to ASCII, and the result string will be used for generating the post filename (thanks, @novica, #349).
- When previewing a blogdown website with Hugo on the RStudio Server, the Hugo configuration
relativeURLswill be set to
trueautomatically (thanks, @nwstephens, #124).
You can create a new post as the index file of a Hugo page bundle via
blogdown::new_post()or the RStudio addin "New Post" if you set
options(blogdown.new_bundle = TRUE). One benefit of using a page bundle instead of a normal page is that you can put resource files associated with the post (such as images) under the same directory of the post itself. This means you no longer have to put them under the
static/directory, which has been quite confusing to Hugo beginners (thanks, @DavisVaughan @romainfrancois @apreshill, #351).
Added an argument
new_site()so that you can preserve the empty directories via
blogdown::new_site(empty_dirs = TRUE). By default, empty directories will be deleted when a new site is created (thanks, @apreshill, rstudio-education/arm-workshop-rsc2019#8).
Added a global option
blogdown.files_filterto allow users to decide which Rmd files to be rebuilt (this option can be set in
.Rprofile). The default filter is
blogdown:::timestamp_filter, i.e., only Rmd files which are older than their output files will be recompiled when rebuilding a site. You can set
options(blogdown.files_filter = blogdown:::md5sum_filter)to use a different filter based on MD5 checksums, i.e., only rebuild an Rmd file if its MD5 checksum has changed. The checksums of Rmd files are saved in the file
blogdown/md5sum.txtunder the website root directory (thanks, @jonathan-g, #341).
- The default value of the argument
new_post()has been changed from
'', which means this function will respect Hugo's default order of looking for the archetype. The
Archetypedropdown menu of the RStudio addin "New Post" was changed accordingly, and this menu will also list archetypes in themes (thanks, David Daza, https://stackoverflow.com/questions/53309582/53341795#comment93989876_53341795).
- Added an option in the "Update Metadata" addin to rename the post filename accordingly when the date is updated, e.g., when the date is changed from
2018-07-28, the post file
2018-07-23-hello-world.mdcan be renamed to