hugo-theme-relearn/exampleSite/content/shortcodes/siteparam.en.md
Sören Weber 8551ee2738
shortcodes: revamp shortcodes #260 #261
- supply named parameter if missing #260
- fix boolean parameter if given as string #261
- revise documentation
2022-06-05 19:31:59 +02:00

44 lines
876 B
Markdown

+++
description = "Get value of site params"
title = "Site param"
+++
The `siteparam` shortcode prints values of site params.
## Usage
While the examples are using named parameter you are free to use positional aswell.
{{< tabs groupId="shortcode-parameter">}}
{{% tab name="named" %}}
````go
{{%/* siteparam name="editURL" */%}}
````
{{% /tab %}}
{{% tab name="positional" %}}
````go
{{%/* siteparam "editURL" */%}}
````
{{% /tab %}}
{{< /tabs >}}
### Parameter
| Name | Position | Default | Notes |
|:---------------------|:---------|:-----------------|:------------|
| **name** | 1 | _&lt;empty&gt;_ | The name of the site param to be displayed. |
## Examples
### `editURL` from `config.toml`
```go
`editURL` value: {{%/* siteparam name="editURL" */%}}
```
`editURL` value: {{% siteparam name="editURL" %}}