itd-site/themes/hugo-theme-relearn/exampleSite/content/shortcodes/siteparam.en.md

23 lines
541 B
Markdown
Raw Normal View History

2021-10-24 09:25:31 +00:00
+++
description = "Get value of site params variables in your page"
title = "Site param"
+++
`siteparam` shortcode is used to help you print values of site params.
For instance, in this current site, the `editURL` variable is used in `config.toml`
```toml
[params]
editURL = "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/"
```
Use the `siteparam` shortcode to display its value.
```go
`editURL` Value : {{%/* siteparam "editURL" */%}}
```
is displayed as
`editURL` Value : {{% siteparam "editURL" %}}