HUGO
Menu
GitHub 87548 stars Mastodon

Permalink

发布给定资源并返回其永久链接。

Syntax

RESOURCE.Permalink

Returns

string

此方法可用于 全局资源页面资源远程资源

Resource 对象上的 Permalink 方法将资源写入发布目录(通常是 public),并返回其 永久链接

{{ with resources.Get "images/a.jpg" }}
  {{ .Permalink }} → https://example.org/images/a.jpg
{{ end }}

Last updated: January 1, 0001
Improve this page