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
)

Arguments

title

Post title

collection

collection to create the post within (defaults to "talks")

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 talks within the filesystem). Pass NULL for no date prefix

draft

Mark the post as a draft (don't include in the article listing)

open

logical. Open the created file?

Note

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

Author

Eric Ekholm and Ella Kaye

Examples

if (FALSE) {
library(distilltools)
create_talk("My Talk")
}