mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
4e0bca2b1e
We need to rework the whole template func docs and, while a good idea, this does not fit into that.
961 B
961 B
title, linktitle, description, godocref, date, publishdate, lastmod, categories, menu, signature, workson, hugoversion, relatedfuncs, deprecated, aliases
| title | linktitle | description | godocref | date | publishdate | lastmod | categories | menu | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ref | ref | Looks up a content page by logical name. | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
|
|
false |
ref and relRef look up a content page by relative path (relref) or logical name (ref) to return the permalink. Both functions require a Page object (usually satisfied with a "."):
{{ relref . "about.md" }}
These functions are used in two of Hugo's built-in shortcodes. You can see basic usage examples of both ref and relref in the shortcode documentation.
For an extensive explanation of how to leverage ref and relref for content management, see Cross References.