hugo/content/functions/ref.md
Bjørn Erik Pedersen ecf5e081b5 Squashed 'docs/' changes from 000ab7c42..4628b9ec2
4628b9ec2 commands: Regen CLI doc
2525f2ed0 data: Regenerate docs helper
6f5a0eb19 Add Hugo 0.30 poster image
72c3fac9e Merge branch 'chroma-next2' into next
364973d3f Fix typo in syntax highlighting.
ce10cc02e Update Chroma highlighting docs
9dcc4d4dd Update robots.md
1e64cb483 Rename title of cross references' page
d6dfbbc51 Add warning about MMark and TOCs
e8d259d32 Fix link to subsection in page
6adead19d Merge commit '040d8d2833c26c53cf9f0e035910821ed50e3863'
040d8d283 Squashed 'themes/gohugoioTheme/' changes from cdaa89c8..6b632895
bde95d890 Add Atlas starter kit
fc40d078d Remove page arg from examples of relref shortcode
c578620b5 Remove page arg from examples of ref shortcode
ee81931a4 Remove delimiters in YAML and TOML config examples
62d7b269f Clarify that .Lastmod automatically uses .GitInfo.AuthorDate (#226)

git-subtree-dir: docs
git-subtree-split: 4628b9ec2c52df4de673a4d6b9621a65d8e8f5a4
2017-10-15 10:20:55 +02:00

875 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
functions
docs
parent
functions
cross references
anchors
ref CONTENT
relref
false

ref and relRef look up a content page by relative path (relref) or logical name (ref) to return the permalink:

{{ ref "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.