RelPermalink
返回給定頁面的相對永久鏈接。
Syntax
PAGE.RelPermalink
Returns
string
站點配置:
baseURL: https://example.org/docs/
title: Documentation
baseURL = 'https://example.org/docs/'
title = 'Documentation'
{
"baseURL": "https://example.org/docs/",
"title": "Documentation"
}
模板:
{{ $page := .Site.GetPage "/about" }}
{{ $page.RelPermalink }} → /docs/about/