RelPermalink
返回当前输出格式所生成页面的相对永久链接。
要使用该方法,你必须先通过 Get 或 Canonical 方法,从页面的 OutputFormats 集合中选出特定的 output format(输出格式)。
{{ with .Site.Home.OutputFormats.Get "rss" }}
{{ .RelPermalink }} → /index.xml
{{ end }}返回当前输出格式所生成页面的相对永久链接。
要使用该方法,你必须先通过 Get 或 Canonical 方法,从页面的 OutputFormats 集合中选出特定的 output format(输出格式)。
{{ with .Site.Home.OutputFormats.Get "rss" }}
{{ .RelPermalink }} → /index.xml
{{ end }}