gsheet2post: Auto attach yaml header to md based on 1 input row of df

Description Usage Arguments

View source: R/post_yaml.R

Description

Auto attach yaml header to md based on 1 input row of df

Usage

1
2
3
4
5
6
gsheet2post(
  df,
  post_dir_name = NULL,
  lookup_id = collabin:::lookup_lope_id,
  author_yml_dir = "content/author_info/"
)

Arguments

df

A data frame with one row.

post_dir_name

String. The name of the directory of the target post. Defaults to NULL. In this case, the value of post_dir_name will be automatically extracted from the column shorturl of the first argument df.

lookup_id

A function. Defaults to collabin:::lookup_lope_id. This function will be used to map the variable id in df to the name of the directory of the author. The file content/author_info/id.yml defines this mapping relationship. The toppest level of the entries in id.yml corresponds to the id column in the passed-in df. The entries id under the toppest level entries are the mapped id returned by collabin:::lookup_lope_id().

author_yml_dir

String. The path to the directories where .ymls of author information are stored.


collabin/collabin-dev documentation built on April 27, 2020, 5:02 a.m.