{{< 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:
- Standard website settings (.Site.Params variables), using the positional parameter of the shortcode.
- Website specific data file , using the named parameter of the shortcode.
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:
[params]
logo = "images/logo.png"
faviconmd = "![Favicon](/images/favicon.png)"
{
"exampleMap": {
"exampleArray": ["VAR1","VAR2","VAR3"],
"exampleString": "STRING"
}
}
[navbar]
[navbar.shortcuts.1_info]
keys = ["Shift","i"]
function = "scShowInfo"
- id: homepage_title
translation: "Homepage"
Markdown | Rendering | ||||
---|---|---|---|---|---|
| |||||
| images/logo.png | ||||
| |||||
|
| ||||
|
| ||||
| STRING | ||||
|
| ||||
| Homepage |