YAML in blogdown comes from a variety of sources. Most YAML will be for your
posts, as described in the blogdown book).
Common R Markdown fields can be used, but there are two other main sources
for YAML fields: Hugo itself and the Hugo theme you are using. Hugo has
numerous top-level YAML to control the output (see the Hugo documentation).
yml_blogdown_opts() supports Hugo YAML. Your Hugo theme may also add fields
to use. To find YAML specific to your theme, see
addition to these sources of YAML, the configuration file for your blog can
also be in YAML, but this is not very common; most use a
based on TOML (see the blogdown book for more).
yml_blogdown_opts( .yml, draft = yml_blank(), publishdate = yml_blank(), weight = yml_blank(), slug = yml_blank(), aliases = yml_blank(), audio = yml_blank(), date = yml_blank(), description = yml_blank(), expiration_date = yml_blank(), headless = yml_blank(), images = yml_blank(), keywords = yml_blank(), layout = yml_blank(), lastmod = yml_blank(), link_title = yml_blank(), resources = yml_blank(), series = yml_blank(), summary = yml_blank(), title = yml_blank(), type = yml_blank(), url = yml_blank(), videos = yml_blank(), ... )
Logical. Set post as a draft? Draft posts will not be rendered
if the site is built via
A future date to publish the post. Future posts are only rendered in the local preview mode
This field can take a numeric value to tell Hugo the order of pages when sorting them, e.g., when you generate a list of all pages under a directory, and two posts have the same date, you may assign different weights to them to get your desired order on the list
A character string used as the tail of the post URL. It is particularly useful when you define custom rules for permanent URLs. See Section 2.2.2 of the blogdown book.
A character vector of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure
A character vector of paths to audio files related to the page
The date assigned to this page. This is usually fetched from the
The description for the content
the date at which the content should no longer be
published by Hugo. Note that the actual YAML field is
A character vector of paths to images related to the page
A character vector of the keywords for the content.
The layout Hugo should use while rendering the content. By
The date the content was last modified at
used for creating links to content. Note that the actual
YAML field is
A named list. Used for configuring page bundle resources. See Hugo's Page Resources documentation
A character vector of series this page belongs to
A summary of the content in the
The title for the content
The type of the content, which is based on the from the directory of the content if not specified
The full path to the content from the web root
A character vector of paths to videos related to the page
additional named R objects, such as characters or lists, to transform into YAML
yml() %>% yml_blogdown_opts( draft = TRUE, slug = "blog-post" )#> --- #> author: Malcolm Barrett #> date: '`r format(Sys.Date())`' #> draft: true #> slug: blog-post #> --- #>