永久链接
Syntax
RESOURCE.Permalink
Returns
string
Permalink 方法用于在 Resource 对象上将资源写入发布目录(通常是 public),并返回其永久链接。
{{ with resources.Get "images/a.jpg" }}
{{ .Permalink }} → https://example.org/images/a.jpg
{{ end }}
Syntax
RESOURCE.Permalink
Returns
string
Permalink 方法用于在 Resource 对象上将资源写入发布目录(通常是 public),并返回其永久链接。
{{ with resources.Get "images/a.jpg" }}
{{ .Permalink }} → https://example.org/images/a.jpg
{{ end }}