new_post: File Structure for a Jekyll Blog Post

Description Usage Arguments Details

Description

A function to set-up the file structure for a Jekyll blog post. Assumes that the current working directory is the root directory of the Jekyll site.

Usage

1
2
new_post(title = "new post", serve = TRUE, dir = "_source",
  subdir = TRUE, skeleton_file = ".skeleton_post")

Arguments

title

The title of the blog post

serve

Should blog_serve be run once the files have been set-up? Defatuls to TRUE.

dir

The directory the post (or subdirectory) should reside in

subdir

Should the post live in a subdirectory? Defaults to TRUE

skeleton_file

The filepath of a skeleton blog post which will be used as the basis for the basis for the newly created file

Details

new_post will create a .R file, and a .Rmd file (by default in a subdirectory), with names created by running title through filenamise. The .R file will contain a short note mentioning that it accompanies the .Rmd file, which will contain the same text as the file supplied by skeleton_post paramter. Both files will be opened using sys_open.


brendan-R/brocks documentation built on May 13, 2019, 5:07 a.m.