post: A Hugo markdown format

Description Usage Arguments Details

Description

An output format suitable for subsequent processing by hugo's Blackfriday. Unlike the default markdown format, YAML is always preserved, no TOC is ever generated, and text is not wrapped. A plot hook is set to output figures as a {{< figure >}} shortcode unless chunk option use_shortcode is FALSE.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
post(
  fig_width = 7,
  fig_height = 5,
  fig_retina = NULL,
  dev = "png",
  fig_path = "figure",
  highlight_shortcode = TRUE,
  transparent_plots = FALSE,
  includes = NULL,
  md_extensions = NULL,
  pandoc_args = NULL
)

Arguments

fig_width, fig_height, fig_retina, dev

as in html_document

fig_path

global setting for fig.path chunk option (a final / is automatically added if absent)

highlight_shortcode

If TRUE (default), fenced code blocks become {{< highlight >}} blocks

transparent_plots

If TRUE, set background of base and ggplot2 plots to transparent. FALSE by default.

includes, md_extensions, pandoc_args

as in md_document

Details

Other default knitting options set here: tidy,error,warning,message,prompt are all FALSE; autodep,cache are TRUE; the figure output path is set to figure/; output width is set to 44; and the global option knitr.table.format is temporarily set to html so that kable will output tables in HTML (it cannot output blackfriday-compatible markdown tables). These settings can be overridden in the usual ways.


agoldst/hugormd documentation built on Nov. 10, 2021, 6:24 p.m.