update_site: Update all files that are out of date

Description Usage Arguments Details Value See Also

View source: R/update.R

Description

update_site rebuilds all source files that are new or have changed since the last time the site was built.

update_dir updates changed files in a subdirectory of "content"

Usage

1
2
3
4
5
6
7
8
9
update_site(
  dir = NULL,
  quiet = FALSE,
  force = FALSE,
  local = FALSE,
  run_hugo = TRUE
)

update_dir(dir = ".", quiet = FALSE, force = FALSE, ignore = NA_character_)

Arguments

dir

A string containing the root directory for checking. By default, the "content" directory of the project.

quiet

Suppress output. By default this is FALSE and the function emits an informational message about how many files will be rebuilt.

force

Force rebuilding source files that are not out of date.

local

Whether to build the website locally. This argument is passed to hugo_build(), and local = TRUE is mainly for serving the site locally via serve_site().

run_hugo

Whether to run hugo_build() after R Markdown files are compiled.

ignore

A regular expression pattern for files to ignore.

Details

Given a source directory (by default the "content" directory in the root directory of the project), find all source files (.Rmd and .rmarkdown) in the directory tree under the source directory, calculate hashed digests of the files, and compare them to a stored list of digests from the last time the site was built.

If the digests of either the source or output files don't match, if a source file is new since the last time the site was built, or if the output file does not exist, then render the source file.

After rendering any out-of-date files, regenerate the digest list and saves it to a file.

Value

This function does not return anything

See Also

build_site(), build_dir(), digests.


jonathan-g/blogdownDigest documentation built on Jan. 23, 2021, 10:52 p.m.