rename_post_dir: Rename a blog post directory

Description Usage Arguments Note Examples

View source: R/create.R

Description

Rename a blog post directory, by default using the title and date specified within the post's front matter.

Usage

1
rename_post_dir(post_dir, slug = "auto", date_prefix = "auto")

Arguments

post_dir

Path to post directory

slug

Post slug (directory name). Automatically computed from title if not provided.

date_prefix

Date prefix for post. Defaults to the post's date field (or the current date if there is none). Pass NULL to not use a date prefix.

Note

This function must be called from with a working directory that is within a Distill website.

Examples

1
2
3
4
5
6
## Not run: 
library(distill)
rename_post_dir("_posts/2020-09-12-my-post")
rename_post_dir("_posts/2020-09-12-my-post", date_prefix = "9/15/2020")

## End(Not run)

radixpub/radix-r documentation built on Feb. 17, 2021, 10:09 p.m.