Post creation takes advantage of Hugo's archetypes or templates, with an extension for .Rmd files. use_post() first calls hugo new (which will apply go templating to .md files in the archetype), and then uses whisker to template any .Rmd files.

use_post(path, kind = NULL, data = list(), site = ".", open = is_interactive())

Arguments

path

Directory to create, like blog/2020-my-favourite-package.

kind

Kind of archetype of use; usually automatically derived from the base directory of path.

data

Any additional data to be used when templating .Rmd files.

The default data includes:

  • date: today's date (in YYYY-MM-DD format).

  • author: whoami::fullname().

  • slug: taken from the file name of path.

site

Path to the hugo site.

open

Open file for interactive editing?