use_post: Create a new post

Description Usage Arguments

View source: R/post.R

Description

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.

Usage

1
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?


r-lib/hugodown documentation built on Feb. 1, 2021, 6:47 a.m.