Page
page in layouts, shortcodes and render hooks, and every element of a page list (site.pages, page.pages, a pager’s pages, …). A list holds summary values: every field below except the relations (parent … term), which only the page being rendered has; get_page, deref and page.parent give a full value. The content fields (content … len) are not available while content is rendered (shortcodes, render hooks): use page_content(page=…) and its siblings there.
Fields#
aliases- Front matter
aliases: a list of URLs that redirect to the page. all_translations- The page in every language, this one included.
alternative_output_formats- The page’s output formats other than its primary one.
ancestors- The sections above the page, nearest first, up to the home page.
bundle_typeleaf,branch, or none for a single file.content- The rendered content (safe HTML).
current_section- The page itself when it is a section or the home page, else its parent section.
date- A date (
{rfc3339, unix}), or none. Format it withpage.date | date(format="%Y-%m-%d"). description- Front matter
description. draft- Whether the page is a draft.
expiry_date- The expiry date, or none.
file- The source file (a file object), or none for pages without one.
first_section- The top-level section the page belongs to (the home page for top-level pages).
fragments- The headings and identifiers of the content (a fragments object).
fuzzy_word_count- The word count rounded up to the next multiple of 100.
git_info- The last Git commit of the page’s file (a Git info object) with
enableGitInfo, else none. id- A number unique to the page within the build. Compare pages by
id:p.id == page.id. is_home- Whether the page is the home page.
is_node- Whether the page is a list page (home, section, taxonomy, term).
is_page- Whether the page is a regular page.
is_section- Whether the page is a section.
is_translated- Whether the page exists in other languages.
keywords- Front matter
keywords: a list of strings. kindhome,page,section,taxonomyorterm.lang- The language code of the page, e.g.
en. language- The page’s language.
lastmod- The last modification date, or none.
layout- Front matter
layout, or none. len- The length of the content in bytes.
link_title- Front matter
linkTitle, else the title. name- The name of the page’s file or bundle directory.
next- The page that precedes this one in
site.regular_pages(usually the newer page), or none. next_in_section- As
next, among the regular pages of the page’s section. output_formats{name: output format}in format order, e.g.page.output_formats.rss.permalink.pages- The pages of a list page: the regular pages and sections directly below a section, the term pages of a taxonomy, the pages of a term; in the default order. In a hierarchical taxonomy: the top-level terms of the taxonomy, the pages of a term and of the terms below it.
params- The page parameters: front matter keys not reserved by fugo, plus
params; keys are lower case. parent- The parent section, or none for the home page. In a hierarchical taxonomy, a term’s parent is the term above it.
path- The logical path of the page, e.g.
/posts/my-post, the keyget_pageaccepts. permalink- The absolute URL of the page’s primary output format (
""when it has none). plain- The content as plain text.
prev- The page that follows this one in
site.regular_pages(newest first by default, so usually the older page), or none. prev_in_section- As
prev, among the regular pages of the page’s section. publish_date- The publish date, or none.
raw_content- The source after the front matter.
reading_time- The estimated reading time in minutes.
regular_pages- The regular pages directly below a list page.
regular_pages_recursive- The regular pages anywhere below a list page.
rel_permalink- The URL path of the page’s primary output format.
resources- The page resources (a list of resources).
section- The first path segment, e.g.
posts. sections- The sections directly below a section or the home page; in a hierarchical taxonomy, the terms directly below the taxonomy page or a term page.
sitemap- The page’s sitemap settings (a sitemap object).
summary- The summary (safe HTML): the content before
<!-, front matter-more- -> summary, or the automatic summary. table_of_contents- The table of contents (safe HTML
<nav id="TableOfContents">), permarkup.tableOfContents. taxonomy- On a taxonomy page:
{singular, plural, terms}(a taxonomy object); else none. term- On a term page:
{name, term, key, singular, plural}(see taxonomy); else none. terms{plural: [page link]}: the page’s terms for every configured taxonomy, e.g.page.terms.tags.title- The title.
translations- The page in the other languages.
truncated- Whether the summary is shorter than the content.
type- The content type: front matter
type, else the section. weight- Front matter
weight(0 when unset). word_count- The number of words of the content.