HUGO
News Docs Themes Community GitHub

Aliases

PAGE.Aliases

Returns the URL aliases as defined in front matter.

AllTranslations

PAGE.AllTranslations

Returns all translations of the given page, including the current language.

AlternativeOutputFormats

PAGE.AlternativeOutputFormats

Returns a slice of OutputFormat objects, excluding the current output format, each representing one of the output formats enabled for the given page.

Ancestors

PAGE.Ancestors

Returns a collection of Page objects, one for each ancestor section of the given page.

BundleType

PAGE.BundleType

Returns the bundle type of the given page, or an empty string if the page is not a page bundle.

CodeOwners

PAGE.CodeOwners

Returns of slice of code owners for the given page, derived from the CODEOWNERS file in the root of the project directory.

Content

PAGE.Content

Returns the rendered content of the given page.

ContentWithoutSummary

PAGE.ContentWithoutSummary

Returns the rendered content of the given page, excluding the content summary.

CurrentSection

PAGE.CurrentSection

Returns the Page object of the section in which the given page resides.

Data

PAGE.Data

Returns a unique data object for each page kind.

Date

PAGE.Date

Returns the date of the given page.

Description

PAGE.Description

Returns the description of the given page as defined in front matter.

Draft

PAGE.Draft

Reports whether the given page is a draft as defined in front matter.

Eq

PAGE1.Eq PAGE2

Reports whether two Page objects are equal.

ExpiryDate

PAGE.ExpiryDate

Returns the expiry date of the given page.

File

PAGE.File

For pages backed by a file, returns file information for the given page.

FirstSection

PAGE.FirstSection

Returns the Page object of the top level section of which the given page is a descendant.

Fragments

PAGE.Fragments

Returns a data structure of the fragments in the given page.

FuzzyWordCount

PAGE.FuzzyWordCount

Returns the number of words in the content of the given page, rounded up to the nearest multiple of 100.

GetPage

PAGE.GetPage PATH

Returns a Page object from the given path.

GetTerms

PAGE.GetTerms TAXONOMY

Returns a collection of term pages for terms defined on the given page in the given taxonomy, ordered according to the sequence in which they appear in front matter.

GitInfo

PAGE.GitInfo

Returns Git information related to the last commit of the given page.

HasMenuCurrent

PAGE.HasMenuCurrent MENU MENUENTRY

Reports whether the given Page object matches the Page object associated with one of the child menu entries under the given menu entry in the given menu.

HasShortcode

PAGE.HasShortcode NAME

Reports whether the given shortcode is called by the given page.

HeadingsFiltered

PAGE.HeadingsFiltered

Returns a slice of headings for each page related to the given page.

InSection

PAGE.InSection SECTION

Reports whether the given page is in the given section.

IsAncestor

PAGE1.IsAncestor PAGE2

Reports whether PAGE1 is an ancestor of PAGE2.

IsDescendant

PAGE1.IsDescendant PAGE2

Reports whether PAGE1 is a descendant of PAGE2.

IsHome

PAGE.IsHome

Reports whether the given page is the home page.

IsMenuCurrent

PAGE.IsMenuCurrent MENU MENUENTRY

Reports whether the given Page object matches the Page object associated with the given menu entry in the given menu.

IsNode

PAGE.IsNode

Reports whether the given page is a node.

IsPage

PAGE.IsPage

Reports whether the given page is a regular page.

IsSection

PAGE.IsSection

Reports whether the given page is a section page.

IsTranslated

PAGE.IsTranslated

Reports whether the given page has one or more translations.

Keywords

PAGE.Keywords

Returns a slice of keywords as defined in front matter.

Kind

PAGE.Kind

Returns the kind of the given page.

Language

PAGE.Language

Returns the language object for the given page.

Lastmod

PAGE.Lastmod

Returns the last modification date of the given page.

Layout

PAGE.Layout

Returns the layout for the given page as defined in front matter.

Len

PAGE.Len

Returns the length, in bytes, of the rendered content of the given page.

LinkTitle

PAGE.LinkTitle

Returns the link title of the given page.

Next

PAGE.Next

Returns the next page in a site's collection of regular pages, relative to the current page.

NextInSection

PAGE.NextInSection

Returns the next regular page in a section, relative to the given page.

OutputFormats

PAGE.OutputFormats

Returns a slice of OutputFormat objects, each representing one of the output formats enabled for the given page.

Page

PAGE.Page

Returns the Page object of the given page.

Pages

PAGE.Pages

Returns a collection of regular pages within the current section, and section pages of immediate descendant sections.

Paginate

PAGE.Paginate COLLECTION [N]

Paginates a collection of pages.

Paginator

PAGE.Paginator

Paginates the collection of regular pages received in context.

Param

PAGE.Param KEY

Returns a page parameter with the given key, falling back to a site parameter if present.

Params

PAGE.Params

Returns a map of custom parameters as defined in the front matter of the given page.

Parent

PAGE.Parent

Returns the Page object of the parent section of the given page.

Path

PAGE.Path

Returns the logical path of the given page.

Permalink

PAGE.Permalink

Returns the permalink of the given page.

Plain

PAGE.Plain

Returns the rendered content of the given page, removing all HTML tags.

PlainWords

PAGE.PlainWords

Calls the Plain method, splits the result into a slice of words, and returns the slice.

Prev

PAGE.Prev

Returns the previous page in a site's collection of regular pages, relative to the current page.

PrevInSection

PAGE.PrevInSection

Returns the previous regular page in a section, relative to the given page.

PublishDate

PAGE.PublishDate

Returns the publish date of the given page.

RawContent

PAGE.RawContent

Returns the raw content of the given page.

ReadingTime

PAGE.ReadingTime

Returns the estimated reading time, in minutes, for the given page.

Ref

PAGE.Ref OPTIONS

Returns the absolute URL of the page with the given path, language, and output format.

RegularPages

PAGE.RegularPages

Returns a collection of regular pages within the current section.

RegularPagesRecursive

PAGE.RegularPagesRecursive

Returns a collection of regular pages within the current section, and regular pages within all descendant sections.

RelPermalink

PAGE.RelPermalink

Returns the relative permalink of the given page.

RelRef

PAGE.RelRef OPTIONS

Returns the relative URL of the page with the given path, language, and output format.

Render

PAGE.Render NAME

Renders the given template with the given page as context.

RenderShortcodes

PAGE.RenderShortcodes

Renders all shortcodes in the content of the given page, preserving the surrounding markup.

RenderString

PAGE.RenderString [OPTIONS] MARKUP

Renders markup to HTML.

Resources

PAGE.Resources

Returns a collection of page resources.

Scratch

PAGE.Scratch

Returns a "scratch pad" to store and manipulate data, scoped to the current page.

Section

PAGE.Section

Returns the name of the top level section in which the given page resides.

Sections

PAGE.Sections

Returns a collection of section pages, one for each immediate descendant section of the given page.

Site

PAGE.Site

Returns the Site object.

Sitemap

PAGE.Sitemap

Returns the sitemap settings for the given page as defined in front matter, falling back to the sitemap settings as defined in the site configuration.

Sites

PAGE.Sites

Returns a collection of all Site objects, one for each language, ordered by language weight.

Slug

PAGE.Slug

Returns the URL slug of the given page as defined in front matter.

Store

PAGE.Store

Returns a "scratch pad" to store and manipulate data, scoped to the current page.

Summary

PAGE.Summary

Returns the summary of the given page.

TableOfContents

PAGE.TableOfContents

Returns a table of contents for the given page.

Title

PAGE.Title

Returns the title of the given page.

TranslationKey

PAGE.TranslationKey

Returns the translation key of the given page.

Translations

PAGE.Translations

Returns all translations of the given page, excluding the current language.

Truncated

PAGE.Truncated

Reports whether the content length exceeds the summary length.

Type

PAGE.Type

Returns the content type of the given page.

Weight

PAGE.Weight

Returns the weight of the given page as defined in front matter.

WordCount

PAGE.WordCount

Returns the number of words in the content of the given page.