Skip to content

blogdown 1.2

Compare
Choose a tag to compare
@yihui yihui released this 04 Mar 15:01

NEW FEATURES

  • Added the argument force back to install_hugo(). If the specified version of Hugo has been installed, install_hugo() will not reinstall it unless force = TRUE (thanks, @cderv, #575).

  • The new option options(blogdown.knit.serve_site = FALSE) can be used to prevent blogdown from starting the web server automatically when the Knit button is clicked in RStudio and the site has not been served yet (thanks, @Athanasiamo, #572). By default, the web server will be started (if not already started) so the page being knitted can be previewed.

  • Added a new global option blogdown.site_root, which can be used to specify the root directory of the website. This can be useful when the website source directory is not the root directory of a project but a subdirectory (thanks, @wjakethompson, #581).

  • Added a new global option blogdown.markdown.format to allow users to customize Pandoc's Markdown output format. When using the file extension .Rmarkdown or options(blogdown.method = 'markdown'), an R Markdown file is first compiled to Markdown. This Markdown file needs to go through another conversion when it contains Markdown features that are only available to Pandoc but not other Markdown renderers such as Hugo/Goldmark, such as citations or fenced Divs. The new global option controls the Pandoc output format. By default, its value is c('gfm', '+footnotes', '+tex_math_dollars') for Pandoc 2.10.1 and later when the Markdown document contains bibliography or fenced Divs, otherwise it is NULL. With earlier versions of Pandoc, it will be c('gfm') only. If you want the conversion to be always performed, you may set this global option to a value that is not NULL, e.g., options(blogdown.markdown.format = c('gfm', '+footnotes', '+tex_math_dollars', '+smart')).

MAJOR CHANGES

  • The method argument of build_site() is now defunct (it was deprecated in blogdown v1.0), and will be removed in a future version. Please set the build method in the global option options(blogdown.method = ) instead.

  • The use_brew argument of install_hugo() is defunct now, and will be removed in a future version.

  • The update_hugo() function is defunct. Please use install_hugo() instead.

  • The scripts R/build.R and R/build2.R are no longer executed when a document is compiled via the Knit button in RStudio. They will be executed only when building the whole site via build_site() (e.g., Ctrl/Cmd + Shift + B in RStudio).

BUG FIXES

  • check_config() will now correctly check for both missing and unneeded values in the ignoreFiles field in the config file.

  • When serving the site with blogdown::serve_site() with 'blogdown.knit.on_save' option being TRUE, Rmd files in renv/ or packrat/ folder are now correctly ignored and not rebuilt (#593).

  • For .Rmarkdown posts, the Markdown extension tex_math_dollars should not be used when post-processing the .markdown output file with Pandoc < v2.10.1 (thanks, @lz100, #578).

  • The new_post() function does not work with bundle archetypes (thanks, @maelle, #577).

  • install_theme() will now remove the .github/ folder if one exists in the theme repo as it is only useful to the theme developer (#584).

  • Plots generated from R code chunks in posts cannot be previewed on RStudio Server (thanks, @cderv @datawookie #587).

  • The error "RStudio is not running" should be suppressed when building the site in a non-interactive R session (thanks, @kcarnold, #596).

  • The theme gcushen/hugo-academic is now correctly automatically redirected to wowchemy/starter-academic with correct default git branch when installing with new_site() or install_theme().

  • Also try to move config/_default/config.yaml to the root dir when installing a theme. Previously, only config.toml was moved (thanks, @andreashandel, #546).

  • When installing a theme, delete figure shortcodes that uses http resources because the figure paths could be mangled on Windows (thanks, @andreashandel, #546).

MINOR CHANGES

  • When clicking the Knit button in RStudio to knit a post, the normal knitting process is shown (such as the progress bar) instead of being suppressed (thanks, @Athanasiamo, #572).

  • The command blogdown:::preview_site() is no longer called or displayed in the R console when users click the Knit button after the server has been started (thanks, @apreshill, #543).

  • The config option ignoreErrors will be set to "error-remote-getjson" when running blogdown::serve_site(). This is to prevent Hugo errors in fetching remote resources such as Tweets (thanks, @earfanfan https://d.cosx.org/d/422065 and dhonda https://stackoverflow.com/q/64601786/559676).