Fix broken link in site variables

This commit is contained in:
Ryan Watters
2017-02-24 03:06:06 -06:00
parent bfd6a131f6
commit aeaaa42ce5
2 changed files with 10 additions and 8 deletions
+9 -7
View File
@@ -20,6 +20,12 @@ draft: false
aliases: []
---
`delimit` called in your template takes the form of
```
{{ delimit array/slice/map delimiter optionallastdelimiter}}
```
`delimit` loops through any array, slice, or map and returns a string of all the values separated by a delimiter, the second argument in the function call. There is an optional third parameter that lets you choose a different delimiter to go between the last two values in the loop.
To maintain a consistent output order, maps will be sorted by keys and only a slice of the values will be returned.
@@ -35,19 +41,15 @@ tags: [ "tag1", "tag2", "tag3" ]
```
{{% /code %}}
`delimit` called in your template takes the form of
```
{{ delimit array/slice/map delimiter optionallastdelimiter}}
```
{{% code file="delimit-pages-tags.html" %}}
{{% code file="delimit-page-tags-input.html" %}}
```html
<p>Tags: {{ delimit .Params.tags ", " }}</p>
```
{{% /code %}}
{{% output "delimit-pages-tags-output.html" %}}
{{% output "delimit-page-tags-output.html" %}}
```html
<p>Tags: tag1, tag2, tag3</p>
```
@@ -55,7 +57,7 @@ tags: [ "tag1", "tag2", "tag3" ]
Here is the same example but with the optional "last" delimiter:
{{% code file="delimit-page-tags-final-and.html" %}}
{{% code file="delimit-page-tags-final-and-input.html" %}}
```golang
Tags: {{ delimit .Params.tags ", " ", and " }}
```
@@ -34,7 +34,7 @@ The following is a list of site-level variables (aka "global"). Many of these va
: a string representing the copyright of your website as defined in the site configuration.
`.Site.Data`
: custom data, see [Data Templates](/templates/date-templates/).
: custom data, see [Data Templates](/templates/data-templates/).
`.Site.DisqusShortname`
: a string representing the shortname of the Disqus shortcode as defined in the site configuration.