2021-08-25 11:33:29 +00:00
|
|
|
+++
|
2022-06-05 17:31:59 +00:00
|
|
|
description = "Get value of site params"
|
2021-08-25 11:33:29 +00:00
|
|
|
title = "Site param"
|
|
|
|
+++
|
2017-09-04 20:24:36 +00:00
|
|
|
|
2022-06-05 17:31:59 +00:00
|
|
|
The `siteparam` shortcode prints values of site params.
|
2021-10-24 09:34:29 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2022-06-05 17:31:59 +00:00
|
|
|
While the examples are using named parameter you are free to use positional aswell.
|
|
|
|
|
|
|
|
{{< tabs groupId="shortcode-parameter">}}
|
|
|
|
{{% tab name="named" %}}
|
|
|
|
|
|
|
|
|
2021-10-24 09:34:29 +00:00
|
|
|
````go
|
2022-06-05 17:31:59 +00:00
|
|
|
{{%/* siteparam name="editURL" */%}}
|
2021-10-24 09:34:29 +00:00
|
|
|
````
|
|
|
|
|
2022-06-05 17:31:59 +00:00
|
|
|
{{% /tab %}}
|
|
|
|
{{% tab name="positional" %}}
|
2021-10-24 09:34:29 +00:00
|
|
|
|
2022-06-05 17:31:59 +00:00
|
|
|
````go
|
|
|
|
{{%/* siteparam "editURL" */%}}
|
|
|
|
````
|
2017-09-04 20:24:36 +00:00
|
|
|
|
2022-06-05 17:31:59 +00:00
|
|
|
{{% /tab %}}
|
|
|
|
{{< /tabs >}}
|
2017-09-04 20:24:36 +00:00
|
|
|
|
2022-06-05 17:31:59 +00:00
|
|
|
### Parameter
|
|
|
|
|
|
|
|
| Name | Position | Default | Notes |
|
|
|
|
|:---------------------|:---------|:-----------------|:------------|
|
|
|
|
| **name** | 1 | _<empty>_ | The name of the site param to be displayed. |
|
2017-09-04 20:24:36 +00:00
|
|
|
|
2022-06-05 17:31:59 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
### `editURL` from `config.toml`
|
2017-09-04 20:24:36 +00:00
|
|
|
|
2021-08-23 21:32:34 +00:00
|
|
|
```go
|
2022-06-05 17:31:59 +00:00
|
|
|
`editURL` value: {{%/* siteparam name="editURL" */%}}
|
2017-09-04 20:24:36 +00:00
|
|
|
```
|
|
|
|
|
2022-06-05 17:31:59 +00:00
|
|
|
`editURL` value: {{% siteparam name="editURL" %}}
|