mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 14:17:43 +00:00
Added remarks about additional parameters in ref/relref (#995)
* Added remark about additional params to ref.md * Added remark about additional params to relref.md * Fixed typo in ref.md
This commit is contained in:
1 parent
ca06c9a56e
commit
8b9c1d4f21
2 files changed
+14
-2
No files matched your search
@@ -5,7 +5,7 @@ description: Looks up a content page by logical name.
|
|||||||
godocref:
|
godocref:
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
lastmod: 2019-12-28
|
||||||
categories: [functions]
|
categories: [functions]
|
||||||
menu:
|
menu:
|
||||||
docs:
|
docs:
|
||||||
@@ -29,6 +29,12 @@ aliases: []
|
|||||||
`ref` looks up Hugo "Regular Pages" only. It can't be used for the homepage, section pages, etc.
|
`ref` looks up Hugo "Regular Pages" only. It can't be used for the homepage, section pages, etc.
|
||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
|
|
||||||
|
It is also possible to pass additional arguments to link to another language or an alternative output format. Therefore, pass a map of arguments instead of just the path.
|
||||||
|
|
||||||
|
```
|
||||||
|
{{ ref . (dict "path" "about.md" "lang" "ja" "outputFormat" "rss") }}
|
||||||
|
```
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/).
|
For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/).
|
||||||
@@ -5,7 +5,7 @@ description: Looks up a content page by relative path.
|
|||||||
godocref:
|
godocref:
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
lastmod: 2019-12-28
|
||||||
categories: [functions]
|
categories: [functions]
|
||||||
menu:
|
menu:
|
||||||
docs:
|
docs:
|
||||||
@@ -29,6 +29,12 @@ aliases: []
|
|||||||
`relref` looks up Hugo "Regular Pages" only. It can't be used for the homepage, section pages, etc.
|
`relref` looks up Hugo "Regular Pages" only. It can't be used for the homepage, section pages, etc.
|
||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
|
|
||||||
|
It is also possible to pass additional arguments to link to another language or an alternative output format. Therefore, pass a map of arguments instead of just the path.
|
||||||
|
|
||||||
|
```
|
||||||
|
{{ relref . (dict "path" "about.md" "lang" "ja" "outputFormat" "rss") }}
|
||||||
|
```
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/).
|
For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/).
|
||||||
Reference in new issue
Block a user