use_post: Create a new post

View source: R/post.R

use_postR Documentation

Create a new post

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

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 Nov. 24, 2022, 10:06 a.m.