<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Page methods on Hugo</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/</link><description>Recent content in Page methods on Hugo</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://v0-122-0--gohugoio.netlify.app/methods/page/index.xml" rel="self" type="application/rss+xml"/><item><title>Aliases</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/aliases/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/aliases/</guid><description>The Aliases method on a Page object returns the URL aliases as defined in front matter.
For example:
content/about.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- aliases: - /old-url - /really-old-url title: About --- +++ aliases = [&amp;#39;/old-url&amp;#39;, &amp;#39;/really-old-url&amp;#39;] title = &amp;#39;About&amp;#39; +++ { &amp;#34;aliases&amp;#34;: [ &amp;#34;/old-url&amp;#34;, &amp;#34;/really-old-url&amp;#34; ], &amp;#34;title&amp;#34;: &amp;#34;About&amp;#34; } To list the aliases:
{{ range .Aliases }} {{ . }} {{ end }}</description></item><item><title>AllTranslations</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/alltranslations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/alltranslations/</guid><description>With this site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; defaultContentLanguage: en languages: de: contentDir: content/de languageCode: de-DE languageName: Deutsch weight: 2 en: contentDir: content/en languageCode: en-US languageName: English weight: 1 fr: contentDir: content/fr languageCode: fr-FR languageName: Français weight: 3 defaultContentLanguage = &amp;#39;en&amp;#39; [languages] [languages.de] contentDir = &amp;#39;content/de&amp;#39; languageCode = &amp;#39;de-DE&amp;#39; languageName = &amp;#39;Deutsch&amp;#39; weight = 2 [languages.en] contentDir = &amp;#39;content/en&amp;#39; languageCode = &amp;#39;en-US&amp;#39; languageName = &amp;#39;English&amp;#39; weight = 1 [languages.</description></item><item><title>AlternativeOutputFormats</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/alternativeoutputformats/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/alternativeoutputformats/</guid><description>Hugo generates one or more files per page when building a site. For example, when rendering home, section, taxonomy, and term pages, Hugo generates an HTML file and an RSS file. Both HTML and RSS are built-in output formats. Create multiple output formats, and control generation based on page kind, or by enabling one or more output formats for one or more pages. See details.
The AlternativeOutputFormats method on a Page object returns a slice of OutputFormat objects, excluding the current output format, each representing one of the output formats enabled for the given page.</description></item><item><title>Ancestors</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/ancestors/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/ancestors/</guid><description>New in v0.109.0 A section is a top-level content directory, or any content directory with an _index.md file.
With this content structure:
content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md &amp;lt;-- front matter: weight = 202311 │ │ ├── auction-1.md │ │ └── auction-2.md │ ├── 2023-12/ │ │ ├── _index.md &amp;lt;-- front matter: weight = 202312 │ │ ├── auction-3.md │ │ └── auction-4.md │ ├── _index.</description></item><item><title>BundleType</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/bundletype/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/bundletype/</guid><description>A page bundle is a directory that encapsulates both content and associated resources. There are two types of page bundles: leaf bundles and branch bundles. See details.
The BundleType method on a Page object returns branch for branch bundles, leaf for leaf bundles, and an empty string if the page is not a page bundle.
content/ ├── films/ │ ├── film-1/ │ │ ├── a.jpg │ │ └── index.md &amp;lt;-- leaf bundle │ ├── _index.</description></item><item><title>CodeOwners</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/codeowners/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/codeowners/</guid><description>GitHub and GitLab support CODEOWNERS files. This file specifies the users responsible for developing and maintaining software and documentation. This definition can apply to the entire repository, specific directories, or to individual files. To learn more:
GitHub CODEOWNERS documentation GitLab CODEOWNERS documentation Use the CodeOwners method on a Page object to determine the code owners for the given page.
To use the CodeOwners method you must enable access to your local Git repository:</description></item><item><title>Content</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/content/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/content/</guid><description>The Content method on a Page object renders markdown and shortcodes to HTML. The content does not include front matter.
{{ .Content }}</description></item><item><title>CurrentSection</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/currentsection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/currentsection/</guid><description>A section is a top-level content directory, or any content directory with an _index.md file.
The current section of a section page, taxonomy page, term page, or the home page, is itself.
Consider this content structure:
content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md &amp;lt;-- current section: 2023-11 │ │ ├── auction-1.md │ │ └── auction-2.md &amp;lt;-- current section: 2023-11 │ ├── 2023-12/ │ │ ├── _index.md │ │ ├── auction-3.</description></item><item><title>Data</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/data/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/data/</guid><description>The Data method on a Page object returns a unique data object for each page kind.
The Data method is only useful within taxonomy and term templates.
Themes that are not actively maintained may still use .Data.Pages in list templates. Although that syntax remains functional, use one of these methods instead: Pages, RegularPages, or RegularPagesRecursive
The examples that follow are based on this site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; taxonomies: author: authors genre: genres [taxonomies] author = &amp;#39;authors&amp;#39; genre = &amp;#39;genres&amp;#39; { &amp;#34;taxonomies&amp;#34;: { &amp;#34;author&amp;#34;: &amp;#34;authors&amp;#34;, &amp;#34;genre&amp;#34;: &amp;#34;genres&amp;#34; } } And this content structure:</description></item><item><title>Date</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/date/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/date/</guid><description>Set the date in front matter:
content/news/article-1.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- date: 2023-10-19T00:40:04-07:00 title: Article 1 --- +++ date = 2023-10-19T00:40:04-07:00 title = &amp;#39;Article 1&amp;#39; +++ { &amp;#34;date&amp;#34;: &amp;#34;2023-10-19T00:40:04-07:00&amp;#34;, &amp;#34;title&amp;#34;: &amp;#34;Article 1&amp;#34; } The date field in front matter is often considered to be the creation date, You can change its meaning, and its effect on your site, in the site configuration. See details.
The date is a time.</description></item><item><title>Description</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/description/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/description/</guid><description>Conceptually different that a content summary, a page description is typically used in metadata about the page.
content/recipes/sushi.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- description: Instructions for making spicy tuna hand rolls. title: How to make spicy tuna hand rolls --- +++ description = &amp;#39;Instructions for making spicy tuna hand rolls.&amp;#39; title = &amp;#39;How to make spicy tuna hand rolls&amp;#39; +++ { &amp;#34;description&amp;#34;: &amp;#34;Instructions for making spicy tuna hand rolls.</description></item><item><title>Draft</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/draft/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/draft/</guid><description>By default, Hugo does not publish draft pages when you build your site. To include draft pages when you build your site, use the --buildDrafts command line flag.
content/posts/post-1.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- draft: true title: Post 1 --- +++ draft = true title = &amp;#39;Post 1&amp;#39; +++ { &amp;#34;draft&amp;#34;: true, &amp;#34;title&amp;#34;: &amp;#34;Post 1&amp;#34; } {{ .Draft }} → true</description></item><item><title>Eq</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/eq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/eq/</guid><description>In this contrived example from a single page template, we list all pages in the current section except for the current page.
{{ $currentPage := . }} {{ range .CurrentSection.Pages }} {{ if not (.Eq $currentPage) }} &amp;lt;a href=&amp;#34;{{ .RelPermalink }}&amp;#34;&amp;gt;{{ .LinkTitle }}&amp;lt;/a&amp;gt; {{ end }} {{ end }}</description></item><item><title>ExpiryDate</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/expirydate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/expirydate/</guid><description>By default, Hugo excludes expired pages when building your site. To include expired pages, use the --buildExpired command line flag.
Set the expiry date in front matter:
content/news/article-1.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- expiryDate: 2024-10-19T00:32:13-07:00 title: Article 1 --- +++ expiryDate = 2024-10-19T00:32:13-07:00 title = &amp;#39;Article 1&amp;#39; +++ { &amp;#34;expiryDate&amp;#34;: &amp;#34;2024-10-19T00:32:13-07:00&amp;#34;, &amp;#34;title&amp;#34;: &amp;#34;Article 1&amp;#34; } The expiry date is a time.Time value. Format and localize the value with the time.</description></item><item><title>File</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/file/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/file/</guid><description>By default, not all pages are backed by a file, including top level section pages, taxonomy pages, and term pages. By definition, you cannot retrieve file information when the file does not exist.
To back one of the pages above with a file, create an _index.md file in the corresponding directory. For example:
content/ └── books/ ├── _index.md &amp;lt;-- the top level section page ├── book-1.md └── book-2.md Code defensively by verifying file existence as shown in each of the examples below.</description></item><item><title>FirstSection</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/firstsection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/firstsection/</guid><description>A section is a top-level content directory, or any content directory with an _index.md file.
When called on the home page, the FirstSection method returns the Page object of the home page itself.
Consider this content structure:
content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md &amp;lt;-- first section: auctions │ │ ├── auction-1.md │ │ └── auction-2.md &amp;lt;-- first section: auctions │ ├── 2023-12/ │ │ ├── _index.md │ │ ├── auction-3.</description></item><item><title>Fragments</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/fragments/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/fragments/</guid><description>New in v0.111.0 In a URL, whether absolute or relative, the fragment links to an id attribute of an HTML element on the page.
/articles/article-1#section-2 ------------------- --------- path fragment Hugo assigns an id attribute to each markdown ATX and setext heading within the page content. You can override the id with a markdown attribute as needed. This creates the relationship between an entry in the table of contents (TOC) and a heading on the page.</description></item><item><title>FuzzyWordCount</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/fuzzywordcount/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/fuzzywordcount/</guid><description>{{ .FuzzyWordCount }} → 200 To get the exact word count, use the WordCount method.</description></item><item><title>GetPage</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/getpage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/getpage/</guid><description>The GetPage method is also available on a Site object. See details.
When using the GetPage method on the Page object, specify a path relative to the current directory or relative to the content directory.
If Hugo cannot resolve the path to a page, the method returns nil. If the path is ambiguous, Hugo throws an error and fails the build.
Consider this content structure:
content/ ├── works/ │ ├── paintings/ │ │ ├── _index.</description></item><item><title>GetTerms</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/getterms/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/getterms/</guid><description>Given this front matter:
content/books/les-miserables.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- tags: - historical - classic - fiction title: Les Misérables --- +++ tags = [&amp;#39;historical&amp;#39;, &amp;#39;classic&amp;#39;, &amp;#39;fiction&amp;#39;] title = &amp;#39;Les Misérables&amp;#39; +++ { &amp;#34;tags&amp;#34;: [ &amp;#34;historical&amp;#34;, &amp;#34;classic&amp;#34;, &amp;#34;fiction&amp;#34; ], &amp;#34;title&amp;#34;: &amp;#34;Les Misérables&amp;#34; } This template code:
{{ with .GetTerms &amp;#34;tags&amp;#34; }} &amp;lt;p&amp;gt;Tags&amp;lt;/p&amp;gt; &amp;lt;ul&amp;gt; {{ range . }} &amp;lt;li&amp;gt;&amp;lt;a href=&amp;#34;{{ .RelPermalink }}&amp;#34;&amp;gt;{{ .LinkTitle }}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; {{ end }} &amp;lt;/ul&amp;gt; {{ end }} Is rendered to:</description></item><item><title>GitInfo</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/gitinfo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/gitinfo/</guid><description>The GitInfo method on a Page object returns an object with additional methods.
Hugo&amp;rsquo;s Git integration is performant, but may increase build times on large sites.
Prerequisites Install Git, create a repository, and commit your project files.
You must also allow Hugo to access your repository. In your site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; enableGitInfo: true enableGitInfo = true { &amp;#34;enableGitInfo&amp;#34;: true } Alternatively, use the command line flag when building your site:</description></item><item><title>HasMenuCurrent</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/hasmenucurrent/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/hasmenucurrent/</guid><description>If the page object associated with the menu entry is a section, this method also returns true for any descendant of that section.
{{ $currentPage := . }} {{ range site.Menus.main }} {{ if $currentPage.IsMenuCurrent .Menu . }} &amp;lt;a class=&amp;#34;active&amp;#34; aria-current=&amp;#34;page&amp;#34; href=&amp;#34;{{ .URL }}&amp;#34;&amp;gt;{{ .Name }}&amp;lt;/a&amp;gt; {{ else if $currentPage.HasMenuCurrent .Menu . }} &amp;lt;a class=&amp;#34;ancestor&amp;#34; aria-current=&amp;#34;true&amp;#34; href=&amp;#34;{{ .URL }}&amp;#34;&amp;gt;{{ .Name }}&amp;lt;/a&amp;gt; {{ else }} &amp;lt;a href=&amp;#34;{{ .URL }}&amp;#34;&amp;gt;{{ .Name }}&amp;lt;/a&amp;gt; {{ end }} {{ end }} See menu templates for a complete example.</description></item><item><title>HasShortcode</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/hasshortcode/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/hasshortcode/</guid><description>By example, let&amp;rsquo;s use MathJax to render a LaTeX mathematical expression:
contents/physics/lesson-1.md Albert Einstein’s theory of special relativity expresses the fact that mass and energy are the same physical entity and can be changed into each other. {{&amp;lt; math &amp;gt;}} $$ E=mc^2 $$ {{&amp;lt; /math &amp;gt;}} In the equation, the increased relativistic mass (m) of a body times the speed of light squared (c2) is equal to the kinetic energy (E) of that body.</description></item><item><title>HeadingsFiltered</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/headingsfiltered/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/headingsfiltered/</guid><description>Use in conjunction with the Related method on a Pages object. See details.</description></item><item><title>InSection</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/insection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/insection/</guid><description>The InSection method on a page object reports whether the given page is in the given section. Note that the method returns true when comparing a page to a sibling.
A section is a top-level content directory, or any content directory with an _index.md file.
With this content structure:
content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md │ │ ├── auction-1.md │ │ └── auction-2.md │ ├── 2023-12/ │ │ ├── _index.</description></item><item><title>IsAncestor</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/isancestor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/isancestor/</guid><description>A section is a top-level content directory, or any content directory with an _index.md file.
With this content structure:
content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md │ │ ├── auction-1.md │ │ └── auction-2.md │ ├── 2023-12/ │ │ ├── _index.md │ │ ├── auction-3.md │ │ └── auction-4.md │ ├── _index.md │ ├── bidding.md │ └── payment.md └── _index.md When rendering the &amp;ldquo;auctions&amp;rdquo; page:
{{ with .</description></item><item><title>IsDescendant</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/isdescendant/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/isdescendant/</guid><description>A section is a top-level content directory, or any content directory with an _index.md file.
With this content structure:
content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md │ │ ├── auction-1.md │ │ └── auction-2.md │ ├── 2023-12/ │ │ ├── _index.md │ │ ├── auction-3.md │ │ └── auction-4.md │ ├── _index.md │ ├── bidding.md │ └── payment.md └── _index.md When rendering the &amp;ldquo;auctions&amp;rdquo; page:
{{ with .</description></item><item><title>IsHome</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/ishome/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/ishome/</guid><description>The IsHome method on a Page object returns true if the page kind is home.
content/ ├── books/ │ ├── book-1/ │ │ └── index.md &amp;lt;-- kind = page │ ├── book-2.md &amp;lt;-- kind = page │ └── _index.md &amp;lt;-- kind = section └── _index.md &amp;lt;-- kind = home {{ .IsHome }}</description></item><item><title>IsMenuCurrent</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/ismenucurrent/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/ismenucurrent/</guid><description>{{ $currentPage := . }} {{ range site.Menus.main }} {{ if $currentPage.IsMenuCurrent .Menu . }} &amp;lt;a class=&amp;#34;active&amp;#34; aria-current=&amp;#34;page&amp;#34; href=&amp;#34;{{ .URL }}&amp;#34;&amp;gt;{{ .Name }}&amp;lt;/a&amp;gt; {{ else if $currentPage.HasMenuCurrent .Menu . }} &amp;lt;a class=&amp;#34;ancestor&amp;#34; aria-current=&amp;#34;true&amp;#34; href=&amp;#34;{{ .URL }}&amp;#34;&amp;gt;{{ .Name }}&amp;lt;/a&amp;gt; {{ else }} &amp;lt;a href=&amp;#34;{{ .URL }}&amp;#34;&amp;gt;{{ .Name }}&amp;lt;/a&amp;gt; {{ end }} {{ end }} See menu templates for a complete example.</description></item><item><title>IsNode</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/isnode/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/isnode/</guid><description>The IsNode method on a Page object returns true if the page kind is home, section, taxonomy, or term.
It returns false is the page kind is page.
content/ ├── books/ │ ├── book-1/ │ │ └── index.md &amp;lt;-- kind = page, node = false │ ├── book-2.md &amp;lt;-- kind = page, node = false │ └── _index.md &amp;lt;-- kind = section, node = true ├── tags/ │ ├── fiction/ │ │ └── _index.</description></item><item><title>IsPage</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/ispage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/ispage/</guid><description>The IsPage method on a Page object returns true if the page kind is page.
content/ ├── books/ │ ├── book-1/ │ │ └── index.md &amp;lt;-- kind = page │ ├── book-2.md &amp;lt;-- kind = page │ └── _index.md &amp;lt;-- kind = section └── _index.md &amp;lt;-- kind = home {{ .IsPage }}</description></item><item><title>IsSection</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/issection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/issection/</guid><description>The IsSection method on a Page object returns true if the page kind is section.
content/ ├── books/ │ ├── book-1/ │ │ └── index.md &amp;lt;-- kind = page │ ├── book-2.md &amp;lt;-- kind = page │ └── _index.md &amp;lt;-- kind = section └── _index.md &amp;lt;-- kind = home {{ .IsSection }}</description></item><item><title>IsTranslated</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/istranslated/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/istranslated/</guid><description>With this site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; defaultContentLanguage: en languages: de: contentDir: content/de languageCode: de-DE languageName: Deutsch weight: 2 en: contentDir: content/en languageCode: en-US languageName: English weight: 1 defaultContentLanguage = &amp;#39;en&amp;#39; [languages] [languages.de] contentDir = &amp;#39;content/de&amp;#39; languageCode = &amp;#39;de-DE&amp;#39; languageName = &amp;#39;Deutsch&amp;#39; weight = 2 [languages.en] contentDir = &amp;#39;content/en&amp;#39; languageCode = &amp;#39;en-US&amp;#39; languageName = &amp;#39;English&amp;#39; weight = 1 { &amp;#34;defaultContentLanguage&amp;#34;: &amp;#34;en&amp;#34;, &amp;#34;languages&amp;#34;: { &amp;#34;de&amp;#34;: { &amp;#34;contentDir&amp;#34;: &amp;#34;content/de&amp;#34;, &amp;#34;languageCode&amp;#34;: &amp;#34;de-DE&amp;#34;, &amp;#34;languageName&amp;#34;: &amp;#34;Deutsch&amp;#34;, &amp;#34;weight&amp;#34;: 2 }, &amp;#34;en&amp;#34;: { &amp;#34;contentDir&amp;#34;: &amp;#34;content/en&amp;#34;, &amp;#34;languageCode&amp;#34;: &amp;#34;en-US&amp;#34;, &amp;#34;languageName&amp;#34;: &amp;#34;English&amp;#34;, &amp;#34;weight&amp;#34;: 1 } } } And this content:</description></item><item><title>Keywords</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/keywords/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/keywords/</guid><description>By default, Hugo evaluates the keywords when creating collections of related content.
content/recipes/sushi.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- keywords: - tuna - sriracha - nori - rice title: How to make spicy tuna hand rolls --- +++ keywords = [&amp;#39;tuna&amp;#39;, &amp;#39;sriracha&amp;#39;, &amp;#39;nori&amp;#39;, &amp;#39;rice&amp;#39;] title = &amp;#39;How to make spicy tuna hand rolls&amp;#39; +++ { &amp;#34;keywords&amp;#34;: [ &amp;#34;tuna&amp;#34;, &amp;#34;sriracha&amp;#34;, &amp;#34;nori&amp;#34;, &amp;#34;rice&amp;#34; ], &amp;#34;title&amp;#34;: &amp;#34;How to make spicy tuna hand rolls&amp;#34; } To list the keywords within a template:</description></item><item><title>Kind</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/kind/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/kind/</guid><description>The page kind is one of home, page, section, taxonomy, or term.
content/ ├── books/ │ ├── book-1/ │ │ └── index.md &amp;lt;-- kind = page │ ├── book-2.md &amp;lt;-- kind = page │ └── _index.md &amp;lt;-- kind = section ├── tags/ │ ├── fiction/ │ │ └── _index.md &amp;lt;-- kind = term │ └── _index.md &amp;lt;-- kind = taxonomy └── _index.md &amp;lt;-- kind = home To get the value within a template:</description></item><item><title>Language</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/language/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/language/</guid><description>The Language method on a Page object returns the language object for the given page. The language object points to the language definition in the site configuration.
You can also use the Language method on a Site object. See details.
Methods The examples below assume the following in your site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; languages: de: languageCode: de-DE languageDirection: ltr languageName: Deutsch weight: 2 [languages] [languages.de] languageCode = &amp;#39;de-DE&amp;#39; languageDirection = &amp;#39;ltr&amp;#39; languageName = &amp;#39;Deutsch&amp;#39; weight = 2 { &amp;#34;languages&amp;#34;: { &amp;#34;de&amp;#34;: { &amp;#34;languageCode&amp;#34;: &amp;#34;de-DE&amp;#34;, &amp;#34;languageDirection&amp;#34;: &amp;#34;ltr&amp;#34;, &amp;#34;languageName&amp;#34;: &amp;#34;Deutsch&amp;#34;, &amp;#34;weight&amp;#34;: 2 } } } Lang (string) The language tag as defined by RFC 5646.</description></item><item><title>Lastmod</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/lastmod/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/lastmod/</guid><description>Set the last modification date in front matter:
content/news/article-1.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- lastmod: 2023-10-19T00:40:04-07:00 title: Article 1 --- +++ lastmod = 2023-10-19T00:40:04-07:00 title = &amp;#39;Article 1&amp;#39; +++ { &amp;#34;lastmod&amp;#34;: &amp;#34;2023-10-19T00:40:04-07:00&amp;#34;, &amp;#34;title&amp;#34;: &amp;#34;Article 1&amp;#34; } The last modification date is a time.Time value. Format and localize the value with the time.Format function, or use it with any of the time methods.
{{ .Lastmod | time.Format &amp;#34;:date_medium&amp;#34; }} → Oct 19, 2023 In the example above we explicitly set the last modification date in front matter.</description></item><item><title>Layout</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/layout/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/layout/</guid><description>Specify the layout field in front matter to target a particular template. See details.
content/contact.md. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; layout: contact title: Contact layout = &amp;#39;contact&amp;#39; title = &amp;#39;Contact&amp;#39; { &amp;#34;layout&amp;#34;: &amp;#34;contact&amp;#34;, &amp;#34;title&amp;#34;: &amp;#34;Contact&amp;#34; } Hugo will render the page using contact.html.
layouts/ └── _default/ ├── baseof.html ├── contact.html ├── home.html ├── list.html └── single.html Although rarely used within a template, you can access the value with:
{{ .</description></item><item><title>Len</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/len/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/len/</guid><description>{{ .Len }} → 42</description></item><item><title>LinkTitle</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/linktitle/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/linktitle/</guid><description>The LinkTitle method returns the linkTitle field as defined in front matter, falling back to the value returned by the Title method.
content/articles/healthy-desserts.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- linkTitle: Dessert recipes title: Seventeen delightful recipes for healthy desserts --- +++ linkTitle = &amp;#39;Dessert recipes&amp;#39; title = &amp;#39;Seventeen delightful recipes for healthy desserts&amp;#39; +++ { &amp;#34;linkTitle&amp;#34;: &amp;#34;Dessert recipes&amp;#34;, &amp;#34;title&amp;#34;: &amp;#34;Seventeen delightful recipes for healthy desserts&amp;#34; } {{ .LinkTitle }} → Dessert recipes As demonstrated above, defining a link title in front matter is advantageous when the page title is long.</description></item><item><title>Next</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/next/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/next/</guid><description>The behavior of the Prev and Next methods on a Page object is probably the reverse of what you expect.
With this content structure:
content/ ├── pages/ │ ├── _index.md │ ├── page-1.md &amp;lt;-- front matter: weight = 10 │ ├── page-2.md &amp;lt;-- front matter: weight = 20 │ └── page-3.md &amp;lt;-- front matter: weight = 30 └── _index.md When you visit page-2:
The Prev method points to page-3 The Next method points to page-1 Use the opposite label in your navigation links as shown in the example below.</description></item><item><title>NextInSection</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/nextinsection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/nextinsection/</guid><description>The behavior of the PrevInSection and NextInSection methods on a Page object is probably the reverse of what you expect.
With this content structure:
content/ ├── books/ │ ├── _index.md │ ├── book-1.md │ ├── book-2.md │ └── book-3.md ├── films/ │ ├── _index.md │ ├── film-1.md │ ├── film-2.md │ └── film-3.md └── _index.md When you visit book-2:
The PrevInSection method points to book-3 The NextInSection method points to book-1 Use the opposite label in your navigation links as shown in the example below.</description></item><item><title>OutputFormats</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/outputformats/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/outputformats/</guid><description>Hugo generates one or more files per page when building a site. For example, when rendering home, section, taxonomy, and term pages, Hugo generates an HTML file and an RSS file. Both HTML and RSS are built-in output formats. Create multiple output formats, and control generation based on page kind, or by enabling one or more output formats for one or more pages. See details.
The OutputFormats method on a Page object returns a slice of OutputFormat objects, each representing one of the output formats enabled for the given page.</description></item><item><title>Page</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/page/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/page/</guid><description>This is a convenience method, useful within partial templates that are called from both shortcodes and page templates.
layouts/shortcodes/foo.html {{ partial &amp;#34;my-partial.html&amp;#34; . }} When the shortcode calls the partial, it passes the current context (the dot). The context includes identifiers such as Page, Params, Inner, and Name.
layouts/_default/single.html {{ partial &amp;#34;my-partial.html&amp;#34; . }} When the page template calls the partial, it also passes the current context (the dot). But in this case, the dot is the Page object.</description></item><item><title>Pages</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/pages/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/pages/</guid><description>The Pages method on a Page object is available to these page kinds: home, section, taxonomy, and term. The templates for these page kinds receive a page collection in context.
Range through the page collection in your template:
{{ range .Pages.ByTitle }} &amp;lt;h2&amp;gt;&amp;lt;a href=&amp;#34;{{ .RelPermalink }}&amp;#34;&amp;gt;{{ .Title }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt; {{ end }} Consider this content structure:
content/ ├── lessons/ │ ├── lesson-1/ │ │ ├── _index.md │ │ ├── part-1.md │ │ └── part-2.</description></item><item><title>Paginate</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/paginate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/paginate/</guid><description>Pagination is the process of splitting a list page into two or more pagers, where each pager contains a subset of the page collection and navigation links to other pagers.
By default, the number of elements on each pager is determined by the value of the paginate setting in your site configuration. The default value is 10. Override the value in your site configuration by providing a second argument, an integer, when calling the Paginate method.</description></item><item><title>Paginator</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/paginator/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/paginator/</guid><description>Pagination is the process of splitting a list page into two or more pagers, where each pager contains a subset of the page collection and navigation links to other pagers. The number of elements on each pager is determined by the value of the paginate setting in your site configuration. The default value is 10.
You can invoke pagination on the home page template, section templates, taxonomy templates, and term templates.</description></item><item><title>Param</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/param/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/param/</guid><description>The Param method on a Page object looks for the given KEY in page parameters, and returns the corresponding value. If it cannot find the KEY in page parameters, it looks for the KEY in site parameters. If it cannot find the KEY in either location, the Param method returns nil.
Site and theme developers commonly set parameters at the site level, allowing content authors to override those parameters at the page level.</description></item><item><title>Params</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/params/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/params/</guid><description>With this front matter:
content/news/annual-conference.md. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; date: 2023-10-17T15:11:37-07:00 display_related: true params: author: email: jsmith@example.org name: John Smith title: Annual conference date = 2023-10-17T15:11:37-07:00 display_related = true title = &amp;#39;Annual conference&amp;#39; [params] [params.author] email = &amp;#39;jsmith@example.org&amp;#39; name = &amp;#39;John Smith&amp;#39; { &amp;#34;date&amp;#34;: &amp;#34;2023-10-17T15:11:37-07:00&amp;#34;, &amp;#34;display_related&amp;#34;: true, &amp;#34;params&amp;#34;: { &amp;#34;author&amp;#34;: { &amp;#34;email&amp;#34;: &amp;#34;jsmith@example.org&amp;#34;, &amp;#34;name&amp;#34;: &amp;#34;John Smith&amp;#34; } }, &amp;#34;title&amp;#34;: &amp;#34;Annual conference&amp;#34; } The title and date fields are standard parameters&amp;mdash;the other fields are user-defined.</description></item><item><title>Parent</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/parent/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/parent/</guid><description>A section is a top-level content directory, or any content directory with an _index.md file.
The parent section of a regular page is the current section.
Consider this content structure:
content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md &amp;lt;-- parent: auctions │ │ ├── auction-1.md │ │ └── auction-2.md &amp;lt;-- parent: 2023-11 │ ├── 2023-12/ │ │ ├── _index.md │ │ ├── auction-3.md │ │ └── auction-4.md │ ├── _index.</description></item><item><title>Permalink</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/permalink/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/permalink/</guid><description>Site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; baseURL: https://example.org/docs/ title: Documentation baseURL = &amp;#39;https://example.org/docs/&amp;#39; title = &amp;#39;Documentation&amp;#39; { &amp;#34;baseURL&amp;#34;: &amp;#34;https://example.org/docs/&amp;#34;, &amp;#34;title&amp;#34;: &amp;#34;Documentation&amp;#34; } Template:
{{ $page := .Site.GetPage &amp;#34;/about&amp;#34; }} {{ $page.Permalink }} → https://example.org/docs/about/</description></item><item><title>Plain</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/plain/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/plain/</guid><description>The Plain method on a Page object renders markdown and shortcodes to HTML, then strips the HTML tags. It does not strip HTML entities. The plain content does not include front matter.
To prevent Go&amp;rsquo;s html/template package from escaping HTML entities, pass the result through the htmlUnescape function.
{{ .Plain | htmlUnescape }}</description></item><item><title>PlainWords</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/plainwords/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/plainwords/</guid><description>The PlainWords method on a Page object calls the Plain method, then uses Go&amp;rsquo;s strings.Fields function to split the result into words.
Fields splits the string s around each instance of one or more consecutive white space characters, as defined by unicode.IsSpace, returning a slice of substrings of s or an empty slice if s contains only white space.
As a result, elements within the slice may contain leading or trailing punctuation.</description></item><item><title>Prev</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/prev/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/prev/</guid><description>The behavior of the Prev and Next methods on a Page object is probably the reverse of what you expect.
With this content structure:
content/ ├── pages/ │ ├── _index.md │ ├── page-1.md &amp;lt;-- front matter: weight = 10 │ ├── page-2.md &amp;lt;-- front matter: weight = 20 │ └── page-3.md &amp;lt;-- front matter: weight = 30 └── _index.md When you visit page-2:
The Prev method points to page-3 The Next method points to page-1 Use the opposite label in your navigation links as shown in the example below.</description></item><item><title>PrevInSection</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/previnsection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/previnsection/</guid><description>The behavior of the PrevInSection and NextInSection methods on a Page object is probably the reverse of what you expect.
With this content structure:
content/ ├── books/ │ ├── _index.md │ ├── book-1.md │ ├── book-2.md │ └── book-3.md ├── films/ │ ├── _index.md │ ├── film-1.md │ ├── film-2.md │ └── film-3.md └── _index.md When you visit book-2:
The PrevInSection method points to book-3 The NextInSection method points to book-1 Use the opposite label in your navigation links as shown in the example below.</description></item><item><title>PublishDate</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/publishdate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/publishdate/</guid><description>By default, Hugo excludes pages with future publish dates when building your site. To include future pages, use the --buildFuture command line flag.
Set the publish date in front matter:
content/news/article-1.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- publishDate: 2023-10-19T00:40:04-07:00 title: Article 1 --- +++ publishDate = 2023-10-19T00:40:04-07:00 title = &amp;#39;Article 1&amp;#39; +++ { &amp;#34;publishDate&amp;#34;: &amp;#34;2023-10-19T00:40:04-07:00&amp;#34;, &amp;#34;title&amp;#34;: &amp;#34;Article 1&amp;#34; } The publish date is a time.Time value. Format and localize the value with the time.</description></item><item><title>RawContent</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/rawcontent/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/rawcontent/</guid><description>The RawContent method on a Page object returns the raw content. The raw content does not include front matter.
{{ .RawContent }} This is useful when rendering a page in a plain text output format.
Shortcodes within the content are not rendered. To get the raw content with shortcodes rendered, use the RenderShortcodes method on a Page object.</description></item><item><title>ReadingTime</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/readingtime/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/readingtime/</guid><description>The estimated reading time is calculated by dividing the number of words in the content by the reading speed.
By default, Hugo assumes a reading speed of 212 words per minute. For CJK languages, it assumes 500 words per minute.
{{ printf &amp;#34;Estimated reading time: %d minutes&amp;#34; .ReadingTime }} Reading speed varies by language. Create language-specific estimated reading times on your multilingual site using site parameters.
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; languages: de: contentDir: content/de languageCode: de-DE languageName: Deutsch params: reading_speed: 179 weight: 2 en: contentDir: content/en languageCode: en-US languageName: English params: reading_speed: 228 weight: 1 [languages] [languages.</description></item><item><title>Ref</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/ref/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/ref/</guid><description>The map of option contains:
path (string) The path to the page, relative to the content directory. Required. lang (string) The language (site) to search for the page. Default is the current language. Optional. outputFormat (string) The output format to search for the page. Default is the current output format. Optional. The examples below show the rendered output when visiting a page on the English language version of the site:</description></item><item><title>RegularPages</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/regularpages/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/regularpages/</guid><description>The RegularPages method on a Page object is available to these page kinds: home, section, taxonomy, and term. The templates for these page kinds receive a page collection in context.
Range through the page collection in your template:
{{ range .RegularPages.ByTitle }} &amp;lt;h2&amp;gt;&amp;lt;a href=&amp;#34;{{ .RelPermalink }}&amp;#34;&amp;gt;{{ .Title }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt; {{ end }} Consider this content structure:
content/ ├── lessons/ │ ├── lesson-1/ │ │ ├── _index.md │ │ ├── part-1.md │ │ └── part-2.</description></item><item><title>RegularPagesRecursive</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/regularpagesrecursive/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/regularpagesrecursive/</guid><description>The RegularPagesRecursive method on a Page object is available to these page kinds: home, section, taxonomy, and term. The templates for these page kinds receive a page collection in context.
Range through the page collection in your template:
{{ range .RegularPagesRecursive.ByTitle }} &amp;lt;h2&amp;gt;&amp;lt;a href=&amp;#34;{{ .RelPermalink }}&amp;#34;&amp;gt;{{ .Title }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt; {{ end }} Consider this content structure:
content/ ├── lessons/ │ ├── lesson-1/ │ │ ├── _index.md │ │ ├── part-1.md │ │ └── part-2.</description></item><item><title>RelPermalink</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/relpermalink/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/relpermalink/</guid><description>Site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; baseURL: https://example.org/docs/ title: Documentation baseURL = &amp;#39;https://example.org/docs/&amp;#39; title = &amp;#39;Documentation&amp;#39; { &amp;#34;baseURL&amp;#34;: &amp;#34;https://example.org/docs/&amp;#34;, &amp;#34;title&amp;#34;: &amp;#34;Documentation&amp;#34; } Template:
{{ $page := .Site.GetPage &amp;#34;/about&amp;#34; }} {{ $page.RelPermalink }} → /docs/about/</description></item><item><title>RelRef</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/relref/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/relref/</guid><description>The map of option contains:
path (string) The path to the page, relative to the content directory. Required. lang (string) The language (site) to search for the page. Default is the current language. Optional. outputFormat (string) The output format to search for the page. Default is the current output format. Optional. The examples below show the rendered output when visiting a page on the English language version of the site:</description></item><item><title>Render</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/render/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/render/</guid><description>Typically used when ranging over a page collection, the Render method on a Page object renders the given template, passing the given page as context.
{{ range site.RegularPages }} &amp;lt;h2&amp;gt;&amp;lt;a href=&amp;#34;{{ .RelPermalink }}&amp;#34;&amp;gt;{{ .LinkTitle }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt; {{ .Render &amp;#34;summary&amp;#34; }} {{ end }} In the example above, note that the template (&amp;ldquo;summary&amp;rdquo;) is identified by its file name without directory or extension.
Although similar to the partial function, there are key differences.</description></item><item><title>RenderShortcodes</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/rendershortcodes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/rendershortcodes/</guid><description>New in v0.117.0 Use this method in shortcode templates to compose a page from multiple content files, while preserving a global context for footnotes and the table of contents.
For example:
layouts/shortcodes/include.html {{ $p := site.GetPage (.Get 0) }} {{ $p.RenderShortcodes }} Then in your markdown:
content/about.md {{% include &amp;#34;/snippets/services.md&amp;#34; %}} {{% include &amp;#34;/snippets/values.md&amp;#34; %}} {{% include &amp;#34;/snippets/leadership.md&amp;#34; %}} Each of the included markdown files can contain calls to other shortcodes.</description></item><item><title>RenderString</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/renderstring/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/renderstring/</guid><description>{{ $s := &amp;#34;An *emphasized* word&amp;#34; }} {{ $s | .RenderString }} → An &amp;lt;em&amp;gt;emphasized&amp;lt;/em&amp;gt; word This method takes an optional map of options:
display (string) Specify either inline or block. If inline, removes surrounding p tags from short snippets. Default is inline. markup (string) Specify a markup identifier for the provided markup. Default is the markup front matter value, falling back to the value derived from the page&amp;rsquo;s file extension.</description></item><item><title>Resources</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/resources/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/resources/</guid><description>The Resources method on a Page object returns a collection of page resources. A page resource is a file within a page bundle.
To work with global or remote resources, see the resources functions.
Methods ByType (resource.Resources) Returns a collection of page resources of the given media type, or nil if none found. The media type is typically one of image, text, audio, video, or application.
{{ range .Resources.ByType &amp;#34;image&amp;#34; }} &amp;lt;img src=&amp;#34;{{ .</description></item><item><title>Scratch</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/scratch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/scratch/</guid><description>The Scratch method on a Page object creates a scratch pad to store and manipulate data. To create a scratch pad that is not reset on server rebuilds, use the Store method instead.
To create a locally scoped scratch pad that is not attached to a Page object, use the newScratch function.
Methods Set Sets the value of a given key.
{{ .Scratch.Set &amp;#34;greeting&amp;#34; &amp;#34;Hello&amp;#34; }} Get Gets the value of a given key.</description></item><item><title>Section</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/section/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/section/</guid><description>With this content structure:
content/ ├── lessons/ │ ├── math/ │ │ ├── _index.md │ │ ├── lesson-1.md │ │ └── lesson-2.md │ └── _index.md └── _index.md When rendering lesson-1.md:
{{ .Section }} → lessons In the example above &amp;ldquo;lessons&amp;rdquo; is the top level section.
The Section method is often used with the where function to build a page collection.
{{ range where .Site.RegularPages &amp;#34;Section&amp;#34; &amp;#34;lessons&amp;#34; }} &amp;lt;h2&amp;gt;&amp;lt;a href=&amp;#34;{{ .RelPermalink }}&amp;#34;&amp;gt;{{ .</description></item><item><title>Sections</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/sections/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/sections/</guid><description>A section is a top-level content directory, or any content directory with an _index.md file.
With this content structure:
content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md &amp;lt;-- front matter: weight = 202311 │ │ ├── auction-1.md │ │ └── auction-2.md │ ├── 2023-12/ │ │ ├── _index.md &amp;lt;-- front matter: weight = 202312 │ │ ├── auction-3.md │ │ └── auction-4.md │ ├── _index.md &amp;lt;-- front matter: weight = 30 │ ├── bidding.</description></item><item><title>Site</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/site/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/site/</guid><description>See Site methods.
{{ .Site.Title }}</description></item><item><title>Sitemap</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/sitemap/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/sitemap/</guid><description>Access to the Sitemap method on a Page object is restricted to sitemap templates.
Methods ChangeFreq (string) How frequently a page is likely to change. Valid values are always, hourly, daily, weekly, monthly, yearly, and never. Default is &amp;quot;&amp;quot; (change frequency omitted from rendered sitemap). {{ .Sitemap.ChangeFreq }} Priority (float) The priority of a page relative to any other page on the site. Valid values range from 0.0 to 1.0. Default is -1 (priority omitted from rendered sitemap).</description></item><item><title>Sites</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/sites/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/sites/</guid><description>This is a convenience method to access .Site.Sites.
With this site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; defaultContentLanguage: de defaultContentLanguageInSubdir: false languages: de: languageCode: de-DE languageDirection: ltr languageName: Deutsch title: Projekt Dokumentation weight: 1 en: languageCode: en-US languageDirection: ltr languageName: English title: Project Documentation weight: 2 defaultContentLanguage = &amp;#39;de&amp;#39; defaultContentLanguageInSubdir = false [languages] [languages.de] languageCode = &amp;#39;de-DE&amp;#39; languageDirection = &amp;#39;ltr&amp;#39; languageName = &amp;#39;Deutsch&amp;#39; title = &amp;#39;Projekt Dokumentation&amp;#39; weight = 1 [languages.</description></item><item><title>Slug</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/slug/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/slug/</guid><description> content/recipes/spicy-tuna-hand-rolls.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- slug: sushi title: How to make spicy tuna hand rolls --- +++ slug = &amp;#39;sushi&amp;#39; title = &amp;#39;How to make spicy tuna hand rolls&amp;#39; +++ { &amp;#34;slug&amp;#34;: &amp;#34;sushi&amp;#34;, &amp;#34;title&amp;#34;: &amp;#34;How to make spicy tuna hand rolls&amp;#34; } This page will be served from:
https://example.org/recipes/sushi To get the slug value within a template:
{{ .Slug }} → sushi</description></item><item><title>Store</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/store/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/store/</guid><description>The Store method on a Page object creates a persistent scratch pad to store and manipulate data. In contrast with the Scratch method, the scratch pad created by the Store method is not reset on server rebuilds.
To create a locally scoped scratch pad that is not attached to a Page object, use the newScratch function.
Methods Set Sets the value of a given key.
{{ .Store.Set &amp;#34;greeting&amp;#34; &amp;#34;Hello&amp;#34; }} Get Gets the value of a given key.</description></item><item><title>Summary</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/summary/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/summary/</guid><description>There are three ways to define the content summary:
Let Hugo create the summary based on the first 70 words. You can change the number of words by setting the summaryLength in your site configuration. Manually split the content with a &amp;lt;--more--&amp;gt; tag in markdown. Everything before the tag is included in the summary. Create a summary field in front matter. To list the pages in a section with a summary beneath each link:</description></item><item><title>TableOfContents</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/tableofcontents/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/tableofcontents/</guid><description>The TableOfContents method on a Page object returns an ordered or unordered list of the markdown ATX and setext headings within the page content.
This template code:
{{ .TableOfContents }} Produces this HTML:
&amp;lt;nav id=&amp;#34;TableOfContents&amp;#34;&amp;gt; &amp;lt;ul&amp;gt; &amp;lt;li&amp;gt;&amp;lt;a href=&amp;#34;#section-1&amp;#34;&amp;gt;Section 1&amp;lt;/a&amp;gt; &amp;lt;ul&amp;gt; &amp;lt;li&amp;gt;&amp;lt;a href=&amp;#34;#section-11&amp;#34;&amp;gt;Section 1.1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;&amp;lt;a href=&amp;#34;#section-12&amp;#34;&amp;gt;Section 1.2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;&amp;lt;a href=&amp;#34;#section-2&amp;#34;&amp;gt;Section 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &amp;lt;/ul&amp;gt; &amp;lt;/nav&amp;gt; By default, the TableOfContents method returns an unordered list of level 2 and level 3 headings. You can adjust this in your site configuration:</description></item><item><title>Title</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/title/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/title/</guid><description>With pages backed by a file, the Title method returns the title field as defined in front matter:
content/about.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- title: About us --- +++ title = &amp;#39;About us&amp;#39; +++ { &amp;#34;title&amp;#34;: &amp;#34;About us&amp;#34; } {{ .Title }} → About us With section pages not backed by a file, the Title method returns the section name, pluralized and converted to title case.
To disable pluralization:</description></item><item><title>TranslationKey</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/translationkey/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/translationkey/</guid><description>The translation key creates a relationship between all translations of a given page. The translation key is derived from the file path, or from the translationKey parameter if defined in front matter.
With this site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; defaultContentLanguage: en languages: de: contentDir: content/de languageCode: de-DE languageName: Deutsch weight: 2 en: contentDir: content/en languageCode: en-US languageName: English weight: 1 defaultContentLanguage = &amp;#39;en&amp;#39; [languages] [languages.de] contentDir = &amp;#39;content/de&amp;#39; languageCode = &amp;#39;de-DE&amp;#39; languageName = &amp;#39;Deutsch&amp;#39; weight = 2 [languages.</description></item><item><title>Translations</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/translations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/translations/</guid><description>With this site configuration:
hugo. yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; defaultContentLanguage: en languages: de: contentDir: content/de languageCode: de-DE languageName: Deutsch weight: 2 en: contentDir: content/en languageCode: en-US languageName: English weight: 1 fr: contentDir: content/fr languageCode: fr-FR languageName: Français weight: 3 defaultContentLanguage = &amp;#39;en&amp;#39; [languages] [languages.de] contentDir = &amp;#39;content/de&amp;#39; languageCode = &amp;#39;de-DE&amp;#39; languageName = &amp;#39;Deutsch&amp;#39; weight = 2 [languages.en] contentDir = &amp;#39;content/en&amp;#39; languageCode = &amp;#39;en-US&amp;#39; languageName = &amp;#39;English&amp;#39; weight = 1 [languages.</description></item><item><title>Truncated</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/truncated/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/truncated/</guid><description>There are three ways to define the content summary:
Let Hugo create the summary based on the first 70 words. You can change the number of words by setting the summaryLength in your site configuration. Manually split the content with a &amp;lt;--more--&amp;gt; tag in markdown. Everything before the tag is included in the summary. Create a summary field in front matter. The Truncated method returns false if you define the summary in front matter.</description></item><item><title>Type</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/type/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/type/</guid><description>The Type method on a Page object returns the content type of the given page. The content type is defined by the type field in front matter, or inferred from the top-level directory name if the type field in front matter is not defined.
With this content structure:
content/ ├── auction/ │ ├── _index.md │ ├── item-1.md │ └── item-2.md &amp;lt;-- front matter: type = books ├── books/ │ ├── _index.</description></item><item><title>Weight</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/weight/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/weight/</guid><description>The Weight method on a Page object returns the weight of the given page as defined in front matter.
content/recipes/sushi.md yaml &amp;nbsp; toml &amp;nbsp; json &amp;nbsp; --- title: How to make spicy tuna hand rolls weight: 42 --- +++ title = &amp;#39;How to make spicy tuna hand rolls&amp;#39; weight = 42 +++ { &amp;#34;title&amp;#34;: &amp;#34;How to make spicy tuna hand rolls&amp;#34;, &amp;#34;weight&amp;#34;: 42 } Page weight controls the position of a page within a collection that is sorted by weight.</description></item><item><title>WordCount</title><link>https://v0-122-0--gohugoio.netlify.app/methods/page/wordcount/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/methods/page/wordcount/</guid><description>{{ .WordCount }} → 103 To round up to nearest multiple of 100, use the FuzzyWordCount method.</description></item></channel></rss>