mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
title: Links and cross references
|
||||
description: Shortcodes for creating links to documents.
|
||||
categories: [content management]
|
||||
keywords: ["cross references","references", "anchors", "urls"]
|
||||
keywords: [cross references,references,anchors,urls]
|
||||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 170
|
||||
toc: true
|
||||
weight: 170
|
||||
toc: true
|
||||
aliases: [/extras/crossreferences/]
|
||||
---
|
||||
|
||||
@@ -35,7 +35,6 @@ The `ref` and `relref` shortcodes require a single parameter: the path to a cont
|
||||
|
||||
The pages can be referenced as follows:
|
||||
|
||||
|
||||
```text
|
||||
{{</* ref "document2" */>}} // <- From pages/document1.md, relative path
|
||||
{{</* ref "document2#anchor" */>}}
|
||||
@@ -138,7 +137,7 @@ produces this HTML:
|
||||
|
||||
## Ref and RelRef Configuration
|
||||
|
||||
The behavior can, since Hugo 0.45, be configured in `hugo.toml`:
|
||||
The behavior can be configured in `hugo.toml`:
|
||||
|
||||
refLinksErrorLevel ("ERROR")
|
||||
: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
|
||||
@@ -146,7 +145,6 @@ refLinksErrorLevel ("ERROR")
|
||||
refLinksNotFoundURL
|
||||
: URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
|
||||
|
||||
|
||||
[lists]: /templates/lists/
|
||||
[output formats]: /templates/output-formats/
|
||||
[shortcode]: /content-management/shortcodes/
|
||||
|
Reference in New Issue
Block a user