1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Merge commit 'ecf5e081b5540e69f4af330233f39a07baf53846'

This commit is contained in:
Bjørn Erik Pedersen
2017-10-15 10:20:55 +02:00
46 changed files with 12024 additions and 200 deletions

View File

@@ -11,7 +11,7 @@ menu:
docs:
parent: "functions"
keywords: [cross references, anchors]
signature: ["ref PAGE CONTENT"]
signature: ["ref CONTENT"]
workson: []
hugoversion:
relatedfuncs: [relref]
@@ -19,10 +19,10 @@ deprecated: false
aliases: []
---
`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 "`.`"):
`ref` and `relRef` look up a content page by relative path (`relref`) or logical name (`ref`) to return the permalink:
```
{{ relref . "about.md" }}
{{ 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](/content-management/shortcodes/#ref-and-relref).

View File

@@ -11,7 +11,7 @@ menu:
docs:
parent: "functions"
keywords: [cross references, anchors]
signature: ["relref PAGE CONTENT"]
signature: ["relref CONTENT"]
workson: []
hugoversion:
relatedfuncs: [relref]
@@ -19,10 +19,10 @@ deprecated: false
aliases: []
---
`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 "`.`"):
`ref` and `relRef` look up a content page by relative path (`relref`) or logical name (`ref`) to return the permalink:
```
{{ relref . "about.md" }}
{{ 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](/content-management/shortcodes/#ref-and-relref).