Merge commit '74309fe5699a595080fdb3a14711e0869babce99'

This commit is contained in:
Bjørn Erik Pedersen
2018-10-29 09:23:25 +01:00
59 changed files with 306 additions and 127 deletions

View File

@@ -42,14 +42,14 @@ Here is the list of "Related" methods available on a page collection such `.Regu
Returns a collection of pages related the given one.
```
{{ $related := .RegularPages.Related . }}
{{ $related := .Site.RegularPages.Related . }}
```
#### .RelatedIndices PAGE INDICE1 [INDICE2 ...]
Returns a collection of pages related to a given one restricted to a list of indices.
```
{{ $related := .RegularPages.RelatedIndices . "tags" "date" }}
{{ $related := .Site.RegularPages.RelatedIndices . "tags" "date" }}
```
#### .RelatedTo KEYVALS [KEYVALS2 ...]
@@ -58,7 +58,7 @@ Returns a collection of pages related together by a set of indices and their mat
In order to build those set and pass them as argument, one must use the `keyVals` function where the first agrument would be the `indice` and the consective ones its potential `matches`.
```
{{ $related := .RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }}
{{ $related := .Site.RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }}
```
{{% note %}}