2021-08-25 11:33:29 +00:00
|
|
|
+++
|
|
|
|
description = "Get value of site params variables in your page."
|
|
|
|
title = "Site param"
|
|
|
|
+++
|
2017-09-04 20:24:36 +00:00
|
|
|
|
2021-08-23 21:51:52 +00:00
|
|
|
`siteparam` shortcode is used to help you print values of site params.
|
2017-09-04 20:24:36 +00:00
|
|
|
|
|
|
|
For instance, in this current site, the `editURL` variable is used in `config.toml`
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[params]
|
2021-07-01 09:01:51 +00:00
|
|
|
editURL = "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/"
|
2017-09-04 20:24:36 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Use the `siteparam` shortcode to display its value.
|
|
|
|
|
2021-08-23 21:32:34 +00:00
|
|
|
```go
|
2017-09-04 20:24:36 +00:00
|
|
|
`editURL` Value : {{%/* siteparam "editURL" */%}}
|
|
|
|
```
|
|
|
|
|
|
|
|
is displayed as
|
|
|
|
|
|
|
|
`editURL` Value : {{% siteparam "editURL" %}}
|