mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '766085c2dc6fc95ac30fda2a9ebde2355fc12554'
This commit is contained in:
@@ -49,6 +49,9 @@ The following is a list of site-level (aka "global") variables. Many of these va
|
||||
.Site.GoogleAnalytics
|
||||
: a string representing your tracking code for Google Analytics as defined in the site configuration.
|
||||
|
||||
.Site.Home
|
||||
: reference to the homepage's [page object](https://gohugo.io/variables/page/)
|
||||
|
||||
.Site.IsMultiLingual
|
||||
: whether there are more than one language in this site. See [Multilingual](/content-management/multilingual/) for more information.
|
||||
|
||||
@@ -83,13 +86,13 @@ The following is a list of site-level (aka "global") variables. Many of these va
|
||||
: all of 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.
|
||||
: 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).
|
||||
|
||||
.Site.Permalinks
|
||||
: a string to override the default [permalink](/content-management/urls/) format as defined in the site configuration.
|
||||
|
||||
.Site.RegularPages
|
||||
: a shortcut to the *regular* page collection. `.Site.RegularPages` is equivalent to `where .Site.Pages "Kind" "page"`.
|
||||
: a shortcut to the *regular* page collection. `.Site.RegularPages` is equivalent to `where .Site.Pages "Kind" "page"`. See [`.Site.Pages`](#site-pages).
|
||||
|
||||
.Site.RSSLink
|
||||
: the URL for the site RSS.
|
||||
@@ -125,4 +128,13 @@ 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`
|
||||
|
||||
{{< readfile file="/content/en/readfiles/pages-vs-site-pages.md" markdown="true" >}}
|
||||
|
||||
|
||||
|
||||
|
||||
[config]: /getting-started/configuration/
|
||||
|
Reference in New Issue
Block a user