This function wraps distill::create_post()
, but defaults to the _talk
collection and pre-populates the post with icon_link()
functions to provide buttons for slides, materials and project. These appear in a code chunk and can be edited. The edit
option in the call to distill::create_post()
must be set to FALSE
, so an open
argument is provided instead that serves the same purpose.
create_talk(
title,
collection = "talks",
author = "auto",
slug = "auto",
date = Sys.Date(),
date_prefix = date,
draft = FALSE,
open = TRUE
)
Post title
collection to create the post within (defaults to "talks")
Post author. Automatically drawn from previous post if not provided.
Post slug (directory name). Automatically computed from title if not provided
Post date (defaults to current date)
Date prefix for post slug (preserves chronological order for talks within the filesystem). Pass NULL
for no date prefix
Mark the post as a draft
(don't include in the article listing)
logical. Open the created file?
This function must be called from with a working directory that is within a Distill website.
if (FALSE) {
library(distilltools)
create_talk("My Talk")
}