summaryrefslogtreecommitdiffstats
path: root/docs/content/en/methods/site/Param.md
blob: 929e30e987d3270c98db7a1313d97ef14157bb85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
title: Param
description: Returns the site parameter with the given key.
categories: []
keywords: []
params:
  functions_and_methods:
    returnType: any
    signatures: [SITE.Param KEY]
---

The `Param` method on a `Site` object is a convenience method to return the value of a user-defined parameter in the site configuration.

{{< code-toggle file=hugo >}}
[params]
display_toc = true
{{< /code-toggle >}}

```go-html-template
{{ .Site.Param "display_toc" }} → true
```

The above is equivalent to either of these:

```go-html-template
{{ .Site.Params.display_toc }}
{{ index .Site.Params "display_toc" }}
```