mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 18:54:40 -04:00
Correct code example for index template function
typo in example code {{ index .Site.Data.locations .Params.location }}
This commit is contained in:
parent
bfa6a55d03
commit
c8f1a2d2f6
@ -71,7 +71,7 @@ This is where the `index` function is needed. `index` takes 2 parameters in this
|
||||
The variable for `.Params.location` is a string and can therefore replace `oslo` in the example above:
|
||||
|
||||
```
|
||||
{{ index .Site.Data.authors .Params.author }}
|
||||
{{ index .Site.Data.locations .Params.location }}
|
||||
=> map[website:https://www.oslo.kommune.no pop_city:658390 pop_metro:1717900]
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user