{{< parameter >}}

Description #


The parameter shortcode allows to display a site parameter according to its type.

TypeDisplay
Map (Key/Value)Table
String listList
StringText

The parameter to display can be set using two different ways:

The parameter to display is read as a markdown and converted accordingly.

Parameters #


NameType(named/positional)Description
positionalStandard parameter path to display.
pathnamedSpecific parameter path to display, relative to the data folder (the parameter must be defined in a data template).
NB: The path parameter takes precedence over the i18n parameter.
i18nnamedi18n key parameter to display.

Examples #


Given the following parameters definitions:

config.toml
[params]
  logo      = "images/logo.png"
  faviconmd = "![Favicon](/images/favicon.png)"
./data/dir/exampleTemplate.json
{
  "exampleMap": {
    "exampleArray": ["VAR1","VAR2","VAR3"],
    "exampleString": "STRING"
  }
}
./theme/data/themeParams.toml
[navbar]
  [navbar.shortcuts.1_info]
    keys = ["Shift","i"]
    function = "scShowInfo"
./theme/i18n/en.yaml
- id: homepage_title
  translation: "Homepage"

MarkdownRendering
{{< parameter "unknown" />}}
{{< parameter "logo" />}}
images/logo.png
{{< parameter "faviconmd" />}}
Favicon
{{< parameter
    path="dir.exampleTemplate.exampleMap"
/>}}
exampleArrayexampleString
  • VAR1
  • VAR2
  • VAR3
STRING
{{< parameter
    path="dir.exampleTemplate.exampleMap.exampleArray"
/>}}
  • VAR1
  • VAR2
  • VAR3
{{< parameter
    path="dir.exampleTemplate.exampleMap.exampleString"
/>}}
STRING
{{< parameter
    path="themeParams.navbar.shortcuts.1_info"
/>}}
functionkeys
scShowInfo
  • Shift
  • i
{{< parameter
    i18n="homepage_title"
/>}}
Homepage