Navigation Menu

Skip to content

Commit

Permalink
Update related.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Mar 14, 2022
1 parent 7aa072e commit 8c66343
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/en/content-management/related.md
Expand Up @@ -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 := .Site.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 := .Site.RegularPages.RelatedIndices . "tags" "date" }}
{{ $related := site.RegularPages.RelatedIndices . "tags" "date" }}
```

#### .RelatedTo KEYVALS [KEYVALS2 ...]
Expand All @@ -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 argument would be the `indice` and the consecutive ones its potential `matches`.

```
{{ $related := .Site.RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }}
{{ $related := site.RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }}
```

{{% note %}}
Expand Down

0 comments on commit 8c66343

Please sign in to comment.