From 8c663433e72bad9205aa42c6fed2baa66bbbd297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 14 Mar 2022 11:01:37 +0100 Subject: [PATCH] Update related.md --- content/en/content-management/related.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/en/content-management/related.md b/content/en/content-management/related.md index a42cec32e..9ede15252 100644 --- a/content/en/content-management/related.md +++ b/content/en/content-management/related.md @@ -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 ...] @@ -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 %}}