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 blogdown_template(). In 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 config.toml file, based on TOML (see the blogdown book for more).

  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(),



a yml object created by yml(), as_yml(), or returned by a yml_*() function


Logical. Set post as a draft? Draft posts will not be rendered if the site is built via blogdown::build_site() or blogdown::hugo_build() but will be rendered in the local preview mode. See Section D.3 of the blogdown book.


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 date field in front matter, but this behavior is configurable.


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 expiryDate


if TRUE, sets a leaf bundle to be headless.


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 default, layout matches type and is thus based on the directory. However, it's possible to use additional layouts within a type. See Hugo's Defining a Content Type documentation.


The date the content was last modified at


used for creating links to content. Note that the actual YAML field is linkTitle


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 .Summary Hugo page variable; see the content-summaries section of Hugo's documentation.


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


a yml object


yml() %>%
    draft = TRUE,
    slug = "blog-post"
#> ---
#> date: '`r format(Sys.Date())`'
#> draft: true
#> slug: blog-post
#> ---