HUGO
Menu
GitHub 87548 stars Mastodon

Permalink

返回给定页面的永久链接。

Syntax

PAGE.Permalink

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.Permalink }} → https://example.org/docs/about/

Last updated: January 1, 0001
Improve this page