diff options
Diffstat (limited to 'docs/content/en/variables/site.md')
-rw-r--r-- | docs/content/en/variables/site.md | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/docs/content/en/variables/site.md b/docs/content/en/variables/site.md index 151e7a12d..117f45346 100644 --- a/docs/content/en/variables/site.md +++ b/docs/content/en/variables/site.md @@ -18,7 +18,7 @@ The following is a list of site-level (aka "global") variables. Many of these va All the methods below, e.g. `.Site.RegularPages` can also be reached via the global [`site`](/functions/site/) function, e.g. `site.RegularPages`, which can be handy in partials where the `Page` object isn't easily available. -## Site variables list +## Site variables .Site.AllPages : array of all pages, regardless of their translation. @@ -66,7 +66,7 @@ All the methods below, e.g. `.Site.RegularPages` can also be reached via the glo : a string representing the language tag as defined in the site configuration. .Site.LanguagePrefix -: this can be used to prefix URLs to point to the correct language. It will even work when only one defined language. See also the functions [absLangURL](/functions/abslangurl/) and [relLangURL](/functions/rellangurl). +: this can be used to prefix URLs to point to the correct language. It will even work when there is only one defined language. See also the functions [absLangURL](/functions/abslangurl/) and [relLangURL](/functions/rellangurl). .Site.Languages : an ordered list (ordered by defined weight) of languages. @@ -78,10 +78,10 @@ All the methods below, e.g. `.Site.RegularPages` can also be reached via the glo : all the menus in the site. .Site.Pages -: array of all content ordered by Date with the newest first. This array contains only the pages in the current language. See [`.Site.Pages`](#site-pages). +: array of all content ordered by Date with the newest first. This array contains only the pages in the current language. .Site.RegularPages -: a shortcut to the *regular* page collection. `.Site.RegularPages` is equivalent to `where .Site.Pages "Kind" "page"`. See [`.Site.Pages`](#site-pages). +: a shortcut to the *regular* page collection. `.Site.RegularPages` is equivalent to `where .Site.Pages "Kind" "page"`. .Site.Sections : top-level directories of the site. @@ -92,7 +92,7 @@ All the methods below, e.g. `.Site.RegularPages` can also be reached via the glo .Site.Title : a string representing the title of the site. -## The `.Site.Params` variable +## Site parameters `.Site.Params` is a container holding the values from the `params` section of your site configuration. @@ -114,10 +114,4 @@ You can use `.Site.Params` in a [partial template](/templates/partials/) to call <meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" /> {{< /code >}} -## The `.Site.Pages` variable {#site-pages} - -### `.Site.Pages` compared to `.Pages` - -{{< getcontent path="readfiles/pages-vs-site-pages.md" >}} - [config]: /getting-started/configuration/ |