{{< parameter >}}

Description#


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

Type Display
Map (Key/Value) Table
String list List
String Text

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

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

Parameters#


Name Type(named/positional) Description
positional Standard parameter path to display.
path named Specific 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.
i18n named i18n 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"

Markdown Rendering
{{</* parameter "unknown" /*/>}}
{{</* parameter "logo" /*/>}}
images/logo.png
{{</* parameter "faviconmd" /*/>}}
Favicon
{{</* parameter
    path="dir.exampleTemplate.exampleMap"
/*/>}}
exampleArray exampleString
  • 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"
/*/>}}
function keys
scShowInfo
  • Shift
  • i
{{</* parameter
    i18n="homepage_title"
/*/>}}
Homepage