mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
b9bd35d72e
git-subtree-dir: docs git-subtree-split: fdea5430f89dfd849d39212abdf5ace0a4763e5a
1,017 B
1,017 B
title | linktitle | description | godocref | date | publishdate | lastmod | categories | menu | keywords | 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 logical name (ref
) or relative path (relref
) to return the permalink:
{{ ref . "about.md" }}
{{% note "Usage Note" %}}
ref
looks up Hugo "Regular Pages" only. It can't be used for the homepage, section pages, etc.
{{% /note %}}
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.