HUGO
Menu
GitHub 87548 stars Mastodon

Aliases

PAGE.Aliases

返回 front matter 中定義的別名作為服務器相對 URL,根據當前內容維度解析。

AllTranslations

PAGE.AllTranslations

返回給定頁面的所有翻譯,包括當前語言,按語言權重排序。

AlternativeOutputFormats

PAGE.AlternativeOutputFormats

返回 OutputFormat 對象的切片,不包括當前輸出格式,每個代表為給定頁面啟用的一個輸出格式。

Ancestors

PAGE.Ancestors

返回 Page 對象的集合,每個代表給定頁面的一個祖先欄目。

BundleType

PAGE.BundleType

返回給定頁面的捆綁包類型,如果頁面不是頁面捆綁包則返回空字符串。

CodeOwners

PAGE.CodeOwners

返回給定頁面的代碼所有者切片,從項目目錄根目錄中的 CODEOWNERS 文件派生。

Content

PAGE.Content

返回給定頁面的渲染內容。

ContentWithoutSummary

PAGE.ContentWithoutSummary

返回給定頁面的渲染內容,不包括內容摘要。

CurrentSection

PAGE.CurrentSection

返回給定頁面所在欄目的 Page 對象。

Data

PAGE.Data

為每種頁面類型返回唯一的數據對象。

Date

PAGE.Date

返回給定頁面的日期。

Description

PAGE.Description

返回 front matter 中定義的給定頁面的描述。

Draft

PAGE.Draft

報告給定頁面是否為 front matter 中定義的草稿。

Eq

PAGE1.Eq PAGE2

報告兩個 Page 對象是否相等。

ExpiryDate

PAGE.ExpiryDate

返回給定頁面的過期日期。

File

PAGE.File

對於有文件支持的頁面,返回給定頁面的文件信息。

FirstSection

PAGE.FirstSection

返回給定頁面為其後代的頂層欄目的 Page 對象。

Fragments

PAGE.Fragments

返回給定頁面中片段的數據結構。

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

返回與給定頁面最後一次提交相關的 Git 信息。

HasMenuCurrent

PAGE.HasMenuCurrent MENU MENUENTRY

報告給定 Page 對象是否與給定菜單中給定菜單條目下的子菜單條目關聯的 Page 對象匹配。

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

報告 PAGE1 是否是 PAGE2 的祖先。

IsDescendant

PAGE1.IsDescendant PAGE2

報告 PAGE1 是否是 PAGE2 的後代。

IsHome

PAGE.IsHome

報告給定頁面是否是主頁。

IsMenuCurrent

PAGE.IsMenuCurrent MENU MENUENTRY

報告給定 Page 對象是否與給定菜單中給定菜單條目關聯的 Page 對象匹配。

IsNode

PAGE.IsNode

報告給定頁面是否是節點頁面。

IsPage

PAGE.IsPage

報告給定頁面是否是常規頁面。

IsSection

PAGE.IsSection

報告給定頁面是否是欄目頁面。

IsTranslated

PAGE.IsTranslated

Reports whether the given page has one or more translations.

Keywords

PAGE.Keywords

返回 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

返回給定頁面的最後修改日期。

Layout

PAGE.Layout

返回 front matter 中定義的給定頁面的布局。

Len

PAGE.Len

返回給定頁面的渲染內容的長度(以字節為單位)。

LinkTitle

PAGE.LinkTitle

返回給定頁面的鏈接標題。

Next

PAGE.Next

返回站點常規頁面集合中相對於當前頁面的下一個頁面。

NextInSection

PAGE.NextInSection

返回當前欄目中相對於給定頁面的下一個常規頁面。

OutputFormats

PAGE.OutputFormats

返回 OutputFormat 對象的切片,每個代表為給定頁面啟用的輸出格式之一。

Page

PAGE.Page

返回給定頁面的 Page 對象。

Pages

PAGE.Pages

返回當前欄目內的常規頁面集合,以及直接後代欄目的欄目頁面。

Paginate

PAGE.Paginate COLLECTION [N]

分頁頁面集合。

Paginator

PAGE.Paginator

分頁上下文中接收的常規頁面集合。

Param

PAGE.Param KEY

返回具有給定鍵的頁面參數,如果存在則回退到站點參數。

Params

PAGE.Params

返回給定頁面 front matter 中定義的自定義參數映射。

Parent

PAGE.Parent

返回給定頁面的父欄目的 Page 對象。

Path

PAGE.Path

返回給定頁面的邏輯路徑。

Permalink

PAGE.Permalink

返回給定頁面的永久鏈接。

Plain

PAGE.Plain

返回給定頁面的渲染內容,移除所有 HTML 標簽。

PlainWords

PAGE.PlainWords

調用 Plain 方法,將結果分割成單詞切片,並返回該切片。

Prev

PAGE.Prev

返回站點常規頁面集合中相對於當前頁面的上一個頁面。

PrevInSection

PAGE.PrevInSection

返回當前欄目中相對於給定頁面的上一個常規頁面。

PublishDate

PAGE.PublishDate

返回給定頁面的發布日期。

RawContent

PAGE.RawContent

返回給定頁面的原始內容。

ReadingTime

PAGE.ReadingTime

返回給定頁面的估計閱讀時間(以分鐘為單位)。

Ref

PAGE.Ref OPTIONS

返回具有給定路徑、語言和輸出格式的頁面的絕對 URL。

RegularPages

PAGE.RegularPages

返回當前欄目內的常規頁面集合。

RegularPagesRecursive

PAGE.RegularPagesRecursive

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

RelPermalink

PAGE.RelPermalink

返回給定頁面的相對永久鏈接。

RelRef

PAGE.RelRef OPTIONS

返回具有給定路徑、語言和輸出格式的頁面的相對 URL。

Render

PAGE.Render NAME

Renders the given template with the given page as context.

RenderShortcodes

PAGE.RenderShortcodes

渲染給定頁面內容中的所有短代碼,保留周圍的標記。

RenderString

PAGE.RenderString [OPTIONS] MARKUP

Renders markup to HTML.

Resources

PAGE.Resources

返回頁面資源的集合。

Rotate

PAGE.Rotate DIMENSION

Returns a collection of all pages sharing the same identity across the specified dimension, including the current page, sorted by the dimension's weight.

Scratch

PAGE.Scratch

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

Section

PAGE.Section

返回給定頁面所在的頂級欄目的名稱。

Sections

PAGE.Sections

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

Site

PAGE.Site

返回 Site 對象。

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

返回給定頁面在 front matter 中定義的 URL slug。

Store

PAGE.Store

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

Summary

PAGE.Summary

返回給定頁面的摘要。

TableOfContents

PAGE.TableOfContents

返回給定頁面的目錄。

Title

PAGE.Title

返回給定頁面的標題。

TranslationKey

PAGE.TranslationKey

返回給定頁面的翻譯鍵。

Translations

PAGE.Translations

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

Truncated

PAGE.Truncated

報告內容長度是否超過摘要長度。

Type

PAGE.Type

返回給定頁面的內容類型。

Weight

PAGE.Weight

返回給定頁面在 front matter 中定義的權重。

WordCount

PAGE.WordCount

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