yml_blogdown_opts {ymlthis} | R Documentation |
Set Top-level YAML options for blogdown
Description
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).
Usage
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(),
...
)
Arguments
.yml |
a |
draft |
Logical. Set post as a draft? Draft posts will not be rendered
if the site is built via |
publishdate |
A future date to publish the post. Future posts are only rendered in the local preview mode |
weight |
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 |
slug |
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. |
aliases |
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 |
audio |
A character vector of paths to audio files related to the page |
date |
The date assigned to this page. This is usually fetched from the
|
description |
The description for the content |
expiration_date |
the date at which the content should no longer be
published by Hugo. Note that the actual YAML field is |
headless |
if |
images |
A character vector of paths to images related to the page |
keywords |
A character vector of the keywords for the content. |
layout |
The layout Hugo should use while rendering the content. By
default, |
lastmod |
The date the content was last modified at |
link_title |
used for creating links to content. Note that the actual
YAML field is |
resources |
A named list. Used for configuring page bundle resources. See Hugo's Page Resources documentation |
series |
A character vector of series this page belongs to |
summary |
A summary of the content in the |
title |
The title for the content |
type |
The type of the content, which is based on the from the directory of the content if not specified |
url |
The full path to the content from the web root |
videos |
A character vector of paths to videos related to the page |
... |
additional named R objects, such as characters or lists, to transform into YAML |
Value
a yml
object
See Also
Other yml:
asis_yaml_output()
,
bib2yml()
,
draw_yml_tree()
,
has_field()
,
read_json()
,
use_yml_defaults()
,
use_yml_file()
,
use_yml()
,
yml_author()
,
yml_bookdown_opts()
,
yml_citations()
,
yml_clean()
,
yml_distill_opts()
,
yml_latex_opts()
,
yml_output()
,
yml_pagedown_opts()
,
yml_params()
,
yml_pkgdown()
,
yml_reference()
,
yml_replace()
,
yml_resource_files()
,
yml_rsconnect_email()
,
yml_rticles_opts()
,
yml_runtime()
,
yml_site_opts()
,
yml_toc()
,
yml_vignette()
Examples
yml() %>%
yml_blogdown_opts(
draft = TRUE,
slug = "blog-post"
)