create_post | R Documentation |
Create a new blog post
create_post( title, collection = "posts", author = "auto", slug = "auto", date = Sys.Date(), date_prefix = date, draft = FALSE, edit = interactive() )
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. |
This function must be called from with a working directory that is within a Distill website.
## Not run: library(distill) create_post("My Post") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.