HUGO
Menu
GitHub 87548 stars Mastodon

Permalink

返回當前輸出格式生成的頁面的永久鏈接。

Syntax

OUTPUTFORMAT.Permalink

Returns

string

要使用此方法,您必須首先使用 GetCanonical 方法從頁面的 OutputFormats 集合中選擇特定的 輸出格式

{{ with .Site.Home.OutputFormats.Get "rss" }}
  {{ .Permalink }} → https://example.org/index.xml
{{ end }}

Last updated: January 1, 0001
Improve this page