diff --git a/content/en/functions/ref.md b/content/en/functions/ref.md index d63c0a89d..feac06c97 100644 --- a/content/en/functions/ref.md +++ b/content/en/functions/ref.md @@ -5,7 +5,7 @@ description: Looks up a content page by logical name. godocref: date: 2017-02-01 publishdate: 2017-02-01 -lastmod: 2017-02-01 +lastmod: 2019-12-28 categories: [functions] menu: docs: @@ -29,6 +29,12 @@ aliases: [] `ref` looks up Hugo "Regular Pages" only. It can't be used for the homepage, section pages, etc. {{% /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). For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/). diff --git a/content/en/functions/relref.md b/content/en/functions/relref.md index ea992af2f..fe5699053 100644 --- a/content/en/functions/relref.md +++ b/content/en/functions/relref.md @@ -5,7 +5,7 @@ description: Looks up a content page by relative path. godocref: date: 2017-02-01 publishdate: 2017-02-01 -lastmod: 2017-02-01 +lastmod: 2019-12-28 categories: [functions] menu: docs: @@ -29,6 +29,12 @@ aliases: [] `relref` looks up Hugo "Regular Pages" only. It can't be used for the homepage, section pages, etc. {{% /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). For an extensive explanation of how to leverage `ref` and `relref` for content management, see [Cross References](/content-management/cross-references/).