Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script for post-processing #458

Merged
merged 3 commits into from May 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -4,6 +4,8 @@

- The "Filename" field in the "New Post" addin in RStudio will use the "Slug" value (if provided) to create the base filename (thanks, @maelle, #448).

- For `blogdown::build_site(method = 'html', run_hugo =TRUE)`, if the R script `R/build2.R` exists, it will be executed after Hugo has built the site. This can be useful if you want to post-process the site (thanks, @chrisjake, #458).

## BUG FIXES

- **blogdown** no longer renders `.Rmd` documents within a packrat / renv library folder, for blog posts whose associated R libraries are managed by these packages (thanks, @kevinushey, #451).
@@ -20,7 +20,9 @@
#' command line \command{Rscript "R/build.R"}, which means it is executed in a
#' separate R session. The value of the argument \code{local} is passed to the
#' command line (you can retrieve the command-line arguments via
#' \code{\link{commandArgs}(TRUE)}).
#' \code{\link{commandArgs}(TRUE)}). For \code{method = "html"}, the R script
#' \file{R/build2.R} (if exists) will be executed after Hugo has built the site.
#' This can be useful if you want to post-process the site.
#' @param local Whether to build the website locally to be served via
#' \code{\link{serve_site}()}.
#' @param method Different methods to build a website (each with pros and cons).
@@ -46,6 +48,7 @@ build_site = function(
}
build_rmds(files)
if (run_hugo) on.exit(hugo_build(local), add = TRUE)
on.exit(run_script('R/build2.R', as.character(local)), add = TRUE)
invisible()
}

Some generated files are not rendered by default. Learn more.