jekyll_create_rmd_draft: Create a Jekyll draft post

View source: R/website.R

jekyll_create_rmd_draftR Documentation

Create a Jekyll draft post

Description

This is the function I use to create new posts for my website.

Usage

jekyll_create_rmd_draft(
  slug = NULL,
  date = NULL,
  dir_drafts = "./_R/_drafts",
  open = TRUE
)

Arguments

slug

A "slug" to use for the post. Should be a string consisting of "hypen-separated-content-words. Defaults to NULL in which case a random slug is created.

date

Date string to use for the post. Default to NULL for the current date format(Sys.Date()).

dir_drafts

Relative path to the folder to store the drafts. Defaults to "./_R/_drafts.

open

Whether to open the file for editing when using RStudio. Defaults to TRUE.

Value

The path to the created file is invisibly returned.


tjmahr/tjmisc documentation built on Feb. 8, 2023, 12:21 p.m.