Pages vs Site Pages
categories:
miscellaneous
Description/Summary
Variable Current context Pages included .Site.Pages any ALL pages of the site: content, sections, taxonomies, etc. – Superset of everything! .Site.RegularPages any Only regular (content) pages – Subset of .Site.Pages .Pages List page Regular pages under that list page representing the homepage, section, taxonomy term (/tags) or taxonomy (/tags/foo) page – Subset of .Site.Pages or .Site.RegularPages, depending on context. .
Content
Variable |
Current context |
Pages included |
.Site.Pages |
any |
ALL pages of the site: content, sections, taxonomies, etc. – Superset of everything! |
.Site.RegularPages |
any |
Only regular (content) pages – Subset of .Site.Pages |
.Pages |
List page |
Regular pages under that list page representing the homepage, section, taxonomy term (/tags ) or taxonomy (/tags/foo ) page – Subset of .Site.Pages or .Site.RegularPages , depending on context. |
.Pages |
Single page |
empty slice |
In the home context (index.html
), .Pages
is the same as
.Site.RegularPages
.
- Note
.Pages
is an alias to .Data.Pages
. It is conventional to
use that alias form.
Page (Debug)
Page Variable | Value |
Name |
"Pages vs Site Pages"
|
Title |
"Pages vs Site Pages"
|
ResourceType |
"page"
|
Kind |
"page"
|
Section |
"posts"
|
Draft |
false
|
Type |
"posts"
|
Layout |
""
|
Permalink |
"https://hugo-sandbox.netlify.com/posts/pages-vs-site-pages/"
|
RelPermalink |
"/posts/pages-vs-site-pages/"
|
Data |
page.Data{} (type:page.Data) |
|
NextPage | Page witting gossiping |
PrevPage | Post 1 |
NextInSection | Page witting gossiping |
PrevInSection | Post 2 |
Page Params (Debug)
maps.Params{"author":[]string{"Kaushal Modi"}, "categories":[]string{"miscellaneous"}, "creator":"Emacs 27.0.50 (Org mode 9.1.13 + ox-hugo)", "draft":false, "iscjklanguage":false, "lastmod":time.Date(2018, time.August, 7, 9, 40, 41, 0, time.Location("")), "title":"Pages vs Site Pages"} (type:maps.Params) |
File Object (Debug)
FileInfo Variable | Value |
UniqueID |
"23f86106623db2e5728a191e7f5196e1"
|
BaseFileName |
"pages-vs-site-pages"
|
TranslationBaseName |
"pages-vs-site-pages"
|
Lang |
"en"
|
Section |
"posts"
|
LogicalName |
"pages-vs-site-pages.md"
|
Dir |
"posts/"
|
Ext |
"md"
|
Path |
"posts/pages-vs-site-pages.md"
|