Skip to content

Releases: rstudio/blogdown

blogdown 1.10

10 May 20:53
Compare
Choose a tag to compare
  • For Jekyll sites, a new global option can be used to determine whether to run jekyll directly or use the bundler gem to run jekyll (i.e., bundle exec jekyll). If you prefer the latter way, you may set options(blogdown.jekyll.bundler = TRUE) before running blogdown::serve_site() (thanks, @pat-s, #695).

  • Adapted to some breaking changes in the wowchemy academic theme again (thanks, @bjsmith, #704). As mentioned in blogdown v1.4, we recommend blogdown users to consider using the hugo-apero theme when creating new sites. This theme is maintained by blogdown authors and much more stable.

  • Updated documentation to mention that the tweet shortcode (or the R wrapper function blogdown::shortcode('tweet')) will require the Twitter username for Hugo >= v0.89.0. Previously only the tweet ID is required, e.g., {{< tweet 852205086956818432 >}}, but now it also requires the user, e.g., {{< tweet user="jtleek", id="852205086956818432" >}} (thanks, @lcolladotor, #701).

blogdown 1.9

28 Mar 22:01
Compare
Choose a tag to compare

NEW FEATURES

  • The RStudio addin "Insert Image" also works when the current document in RStudio does not belong to any site projects. Previously, it would throw an error if it is not used inside a site project. Now it works in any document in RStudio (thanks, @yufree, rstudio/rmarkdown#2280).

BUG FIXES

  • knitr::current_input() doesn't work in inline R expressions in YAML metadata of Rmd posts (thanks, @brshallo, #647).

blogdown 1.8

16 Feb 20:08
Compare
Choose a tag to compare

NEW FEATURES

  • The bookdown config file _bookdown.yml under the site root directory is recognized now. For example, you can customize the figure label in _bookdown.yml (thanks, @luofeicq, yihui/yihui.org#167).

  • The internal function scan_yaml() uses cache in the current R session now. Other functions (e.g., find_yaml(), count_yaml(), and the "New Post" addin in RStudio) based on this function should be much faster when there are a lot of files to scan for more than once.

BUG FIXES

  • For Hugo versions from 0.89.0 to 0.89.2, new_content() failed to identify new content files if they were created with archetypes (thanks, @maelle, #685).

  • When creating new posts, YAML metadata inherited from Hugo archetypes could be mangled (thanks, @llrs, #684).

blogdown 1.7

19 Dec 04:48
Compare
Choose a tag to compare

MINOR CHANGES

  • The version argument of find_hugo() allows for the prefix v in the version number now, e.g., find_hugo('v0.89.2') is equivalent to find_hugo('0.89.2'). This is also true to other functions that use find_hugo(), such as remove_hugo().

  • Clarified write_toml()'s error message that Hugo >= 0.37 is required to run this function (thanks, @pssguy, #665).

BUG FIXES

  • install_hugo() did not work for Hugo v0.20.3.

  • new_post() failed to correctly detect the path of the new post with Hugo >= 0.89.3 (thanks, @rcarboni, #667).

  • Deal with the new security policy in Hugo 0.91.0 by renaming the internal environment variable BLOGDOWN_POST_RELREF (in the shortcode layouts/shortcodes/blogdown/postref.html) to HUGO_BLOGDOWN_POST_RELREF (thanks, @Nitheshnirmal #672, @gergiu #673).

blogdown 1.6

09 Nov 20:23
Compare
Choose a tag to compare

NEW FEATURES

  • The config file config/_default/config.yaml (or .toml) is supported now; blogdown no longer requires that config.yaml (or .toml) is under the root directory of the website project. Note that if config.yaml is present under both the root directory and the config/_default/ directory, blogdown will only recognize the former, and you may want to delete the former if you actually intend to use the latter (thanks, @Athanasiamo @maelle #611, @diegouriarte #598).

  • install_hugo() can automatically correct the version number X.Y to X.Y.0 when X.Y does not exist but X.Y.0 does. For example, install_hugo('0.87') will actually install the version 0.87.0.

  • Added a global option blogdown.server.first, which can be specified as a function to run before serving the site. For example, you can sync a JS file to the static/ directory with options(blogdown.server.first = function() { file.copy('../foo/bar.js', './static/js/', overwrite = TRUE) }) each time before you serve the site.

  • Added arguments arch and os to install_hugo() so that users can choose the architecture and operating system names manually. For example, blogdown::install_hugo(extended = FALSE, arch = '64bit', os = 'FreeBSD') would install hugo_*_FreeBSD-64bit.tar.gz (* denotes a version number) from https://github.com/gohugoio/hugo/releases.

  • Added a new function hugo_installers() to print out the information about available Hugo installers of a certain version. This can be helpful when install_hugo() fails, e.g., the installer for a certain os or arch is not available.

MAJOR CHANGES

  • When creating new posts (either with new_post() or the RStudio addin "New Post"), the default post filename will be generated from the post title but it will exclude all non-alphanumeric characters. Previously the exclusion of these characters failed under certain locales (e.g., UTF-8 or a locale that has native support for multibyte characters). Now the default filename will no longer contain non-alphanumeric characters except dashes (thanks, yingjie, https://d.cosx.org/d/422702).

MINOR CHANGES

  • The intermediate files .knit.md$ and .utf8.md$ no longer need to be ignored in ignoreFiles in the Hugo config file now. There is no harm to ignore them anyway. If you have ignored them, you do not need to update your config (#609).

BUG FIXES

  • The global option blogdown.subdir_fun can be a function that takes the post title as the input and returns a path of subdirectory under which the new post is to be created via the "New Post" addin in RStudio. The "New Post" addin failed to add the subdirectory defined by this function to the choices of the "Subdirectory" select input if the subdirectory does not exist in the choices, therefore it could not really be used. Now the subdirectory is corrected added, and can be used (thanks, @datawookie, #656).

  • install_hugo() stopped working with Hugo v0.89.0 (thanks, @martinolmos, #664).

  • On Windows, new_post() may fail to open the new post if the filename contains multibyte characters (thanks, yingjie, https://d.cosx.org/d/422702).

blogdown 1.5

02 Sep 18:29
Compare
Choose a tag to compare

NEW FEATURES

  • Added a new function check_vercel() to check the Vercel config vercel.json, and a new function config_vercel() to create vercel.json that contains the Hugo version (thanks, @chuxinyuan, #648). Vercel (https://vercel.com) is service similar to Netlify.

  • Added an argument time to new_post() to optionally include the local time in the date field of the new post with new_post(time = TRUE). The value of this argument can also be set via the global option in .Rprofile, e.g., options(blogdown.time = TRUE) (it is FALSE by default). See the help page ?blogdown::new_post for more information (thanks, @earfanfan, #625).

BUG FIXES

blogdown 1.4

23 Jul 14:23
Compare
Choose a tag to compare

NEW FEATURES

  • check_config() now checks for baseURL that only provides a domain name but lacks the https (or http) protocol, e.g., baseURL: example.com/ is typically not a valid URL, but should be https://example.com/ instead (thanks, @apreshill, #616).

BUG FIXES

  • Fixed a new issue with blogdown::new_site(theme = "wowchemy/starter-hugo-academic") (#638). To avoid similar issues with the academic theme in the future, we recommend that you consider using the hugo-apero/hugo-apero theme instead.

  • install_hugo() can install the correct version of Hugo on a machine with an ARM processor now (thanks, @r-saikat, #636).

  • clean_duplicates() now correctly deletes duplicated .html file instead of .md when blogdown.method option is set to markdown (thanks, @apreshill, #628).

  • clean_duplicates() also correctly deletes unused directories like *_files/header-attrs associated with .html output files (thanks, @apreshill, #632).

blogdown 1.3

14 Apr 15:28
Compare
Choose a tag to compare

NEW FEATURES

  • check_config() will suggest ignoring the renv folder and the renv.lock file in the Hugo config if renv is used in the project (thanks, @solarchemist, #597).

  • check_content() will also discover problematic YAML metadata of posts that is not a list (thanks, msmielak, https://stackoverflow.com/q/66857582/559676).

  • New project menu in RStudio IDE now allows to select for keeping config.toml (thanks, @ogansser, #606).

MAJOR CHANGES

  • The method argument of build_site() has been removed (it was defunct in blogdown v1.2). Please set the build method in the global option options(blogdown.method = ) instead.

  • The use_brew argument of install_hugo() has been removed.

BUG FIXES

  • check_content() will ignore renv folders when looking for Rmd/md files to be checked (thanks, @solarchemist, #597).

  • The RStudio addin "Update Metadata" does not work when the global option blogdown.rename_file is not set (thanks, @brshallo, #605).

  • The RStudio addin "New Post" does not work when the YAML metadata of a post only contains a string. Normally the metadata should be a list (thanks, msmielak, https://stackoverflow.com/q/66857582/559676).

  • When .Rmd is not ignored in the ignoreFiles field in the site config file (this can be detected by blogdown::check_site() and you should fix it), .Rmd files may be copied to the public/ directory when building the site via blogdown::build_site(), which can cause problems when blogdown::serve_site() is running, i.e., .Rmd files will be rendered to the rmarkdown::html_document() format by rmarkdown::render(). As a result, the corresponding web pages will not be rendered by Hugo but only Pandoc, and they will lose the site style or shortcodes (thanks, @ogansser, #610 #608). Now blogdown::check_site() should detect this problem and recommend fixes.

blogdown 1.2

04 Mar 15:01
Compare
Choose a tag to compare

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).

blogdown 1.1

19 Jan 18:48
Compare
Choose a tag to compare

NEW FEATURES

  • Added new arguments args, baseURL, and relativeURLs to the hugo_build() function to allow users to pass more command-line arguments to Hugo and adjust the configurations baseURL and relativeURLs temporarily when building a site.

  • Added the ... argument to build_site(), to pass more arguments to the hugo_build() function, e.g., blogdown::build_site(relativeURLs = TRUE).

  • Added a global option blogdown.server.verbose to print the web server messages in real time when the server is running. Once enabled (via options(blogdown.server.verbose = TRUE)), you will see messages in the R console like "Change detected, rebuilding site" whenever you make changes to any files (thanks, @apreshill @cderv, #555).

  • Added a new global option blogdown.protect.math (defaults to TRUE) to control whether to protect LaTeX math expressions in a pair of backticks when the post output format is Markdown instead of HTML. The reason to protect math expressions is to avoid the Markdown renderer's treatment of the math content as normal Markdown content, which may mangle the math expressions. If the math expression is protected, it needs to be unprotected later. See https://yihui.org/en/2018/07/latex-math-markdown/ for more information. Note that this option is only relevant to those who use the source format .Rmarkdown or the build method options(blogdown.method = 'markdown') (thanks, @bensoltoff #466, @mrkaye97 #567).

BUG FIXES

  • bundle_site() also moves the .html output files and the *_files//*_cache/ directories associated with .Rmd source posts to page bundles. Previously, only .Rmd files are moved (thanks, @llrs, #568).

  • Fixed a bug of install_theme() when the theme archive contains theme files directly instead of a theme folder (thanks, Stefan Musch, https://stackoverflow.com/q/65702805/559676).

  • Fixed a bug that causes HTML widgets to fail to render in the Markdown output files with htmltools >= 0.5.1.

  • Fixed a bug on Windows that causes check_gitignore() to error when it shouldn't (#571).

MAJOR CHANGES

  • When the site is rendered via a call to rsconnect::deploySite() (e.g., when you call rmarkdown::publish_site(render = TRUE)), blogdown::build_site() will use the argument relativeURLs = TRUE, to make Hugo generate relative URLs that work with any base URL (note that this depends on how well a specific Hugo theme supports relative URLs).

MINOR CHANGES

  • check_netlify() and check_config() do not open files anymore in the IDE if no TODO items were found in them (#569).

  • The internal functions md5sum_filter() and timestamp_filter() have been removed. They were renamed to filter_md5sum() and filter_timestamp(), respectively, and exported in blogdown 1.0. Please use these exported functions instead if you relied on the internal functions previously.