From: Roy Reveltas Date: Wed, 18 May 2016 07:43:30 +0000 (+0100) Subject: docs: Add an example of how to use .PrevInSection X-Git-Tag: v0.16~16 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=56116315;p=brevno-suite%2Fhugo docs: Add an example of how to use .PrevInSection It's not a common knowledge what the "pointer" is so let's add an example of how to use .PrevInSection --- diff --git a/docs/content/templates/variables.md b/docs/content/templates/variables.md index 03398277..25557c2e 100644 --- a/docs/content/templates/variables.md +++ b/docs/content/templates/variables.md @@ -44,7 +44,7 @@ matter, content or derived from file location. **.TableOfContents** The rendered table of contents for this content.
**.Prev** Pointer to the previous content (based on pub date).
**.Next** Pointer to the following content (based on pub date).
-**.PrevInSection** Pointer to the previous content within the same section (based on pub date)
+**.PrevInSection** Pointer to the previous content within the same section (based on pub date). For example, `{{if .PrevInSection}}{{.PrevInSection.Permalink}}{{end}}`.
**.NextInSection** Pointer to the following content within the same section (based on pub date)
**.FuzzyWordCount** The approximate number of words in the content.
**.WordCount** The number of words in the content.