Correct code example for index template function

typo in example code {{ index .Site.Data.locations .Params.location }}
This commit is contained in:
Sean Shao authored and digitalcraftsman committed 2017-09-19 15:33:25 +02:00
1 parent bfa6a55d03
commit c8f1a2d2f6
1 file changed
+1 -1
+1 -1
View File
@@ -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: 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] => map[website:https://www.oslo.kommune.no pop_city:658390 pop_metro:1717900]
``` ```