Convert to a Hugo markdown page document

Description

Format for converting from RMarkdown to a markdown (commonmark) page for inclusion in a Hugo site.

Usage

hugo_page(
  keywords = NULL,
  title = NULL,
  weight = NULL,
  draft = NULL,
  header = NULL,
  footer = NULL,
  toc = FALSE,
  toc_depth = 3,
  fig_width = 7,
  fig_height = 5,
  fig_retina = NULL,
  dev = "png",
  df_print = "default",
  includes = NULL,
  md_extensions = NULL,
  pandoc_args = NULL,
  ...
)

Arguments

  • keywords: (Hugo) By default the keywords are copied from the root of the RMarkdown front matter, but you can override it if you wish to use different keywords in Hugo.
  • title: (Hugo) By default the title is copied from the root of the RMarkdown front matter, but you can override it if you wish to use a different title in Hugo.
  • weight: (Hugo)
  • draft: (Hugo)
  • header: character(); lines of text to include in output between the front matter and main content
  • footer: character(); lines of text to include in the output after the main content
  • toc: TRUE to include a table of contents in the output
  • toc_depth: Depth of headers to include in table of contents
  • fig_width: Default width (in inches) for figures
  • fig_height: Default height (in inches) for figures
  • fig_retina: Scaling to perform for retina displays. Defaults to NULL which performs no scaling. A setting of 2 will work for all widely used retina displays, but will also result in the output of <img> tags rather than markdown images due to the need to set the width of the image explicitly.
  • dev: Graphics device to use for figure output (defaults to png)
  • df_print: Method to be used for printing data frames. Valid values include “default”, “kable”, “tibble”, and “paged”. The “default” method uses a corresponding S3 method of print, typically print.data.frame. The “kable” method uses the [knitr::kable](https://rdrr.io/pkg/knitr/man/kable.html) function. The “tibble” method uses the tibble package to print a summary of the data frame. The “paged” method creates a paginated HTML table (note that this method is only valid for formats that produce HTML). In addition to the named methods you can also pass an arbitrary function to be used for printing data frames. You can disable the df_print behavior entirely by setting the option rmarkdown.df_print to FALSE. See Data frame printing section in bookdown book for examples.
  • includes: Named list of additional content to include within the document (typically created using the [includes](https://rdrr.io/pkg/rmarkdown/man/includes.html) function).
  • md_extensions: Markdown extensions to be added or removed from the default definition of R Markdown. See the [rmarkdown_format](https://rdrr.io/pkg/rmarkdown/man/rmarkdown_format.html) for additional details.
  • pandoc_args: Additional command line options to pass to pandoc
  • ...: extra Hugo front matter variables

Details

Parameters marked (Hugo) are copied to the hugo front matter. See https://gohugo.io/content-management/front-matter/ for details on their meaning.

Value

R Markdown output format to pass to [render](https://rdrr.io/pkg/rmarkdown/man/render.html)