File tree Expand file tree Collapse file tree
themes/rejekts/layouts/_shortcodes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {{/*
2+ This shortcode is used to render parameters from the site's config.yaml file within other values in the config
3+ It can be used in config like this:
4+ title: Cloud Native Rejekts {{< params event.edition > }}
5+ This will render the `event.edition` value as part of the title.
6+
7+ This shortcode also supports some helpers to format the value being referenced:
8+ * `replace` to replace a substring - e.g. `{{< params event.edition replace " " "_" > }}`
9+ * `month` to format the date as month name
10+ * `day` to format the date as day of the week
11+ * `year` to format the date as year
12+ */}}
113{{- $key := cond (.IsNamedParams) (.Get "key") (.Get 0) -}}
214{{- $fn := cond (.IsNamedParams) (.Get "function") (.Get 1) -}}
315{{- $param := (index .Site.Params (split $key ".")) -}}
You can’t perform that action at this time.
0 commit comments