create_post {distill} | R Documentation |
Create a new blog post
Description
Create a new blog post
Usage
create_post(
title,
collection = "posts",
author = "auto",
slug = "auto",
date = Sys.Date(),
date_prefix = date,
draft = FALSE,
edit = interactive()
)
Arguments
title |
Post title |
collection |
Collection to create the post within (defaults to "posts") |
author |
Post author. Automatically drawn from previous post if not provided. |
slug |
Post slug (directory name). Automatically computed from title if not provided. |
date |
Post date (defaults to current date) |
date_prefix |
Date prefix for post slug (preserves chronological order for posts
within the filesystem). Pass |
draft |
Mark the post as a |
edit |
Open the post in an editor after creating it. |
Note
This function must be called from with a working directory that is within a Distill website.
Examples
## Not run:
library(distill)
create_post("My Post")
## End(Not run)
[Package distill version 1.6 Index]