mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 16:17:21 +00:00
Fix ref and relref shortcode usage patterns
The documentname parameter to `ref` and `relref` shortcodes must include file extension. Including the file extension in the given usage patterns will make it much easier for users to follow.
This commit is contained in:
1 parent
4e7123d208
commit
000ab7c423
1 file changed
+5
-5
@@ -21,12 +21,12 @@ toc: true
|
|||||||
## Use `ref` and `relref`
|
## Use `ref` and `relref`
|
||||||
|
|
||||||
```
|
```
|
||||||
{{</* ref "document" */>}}
|
{{</* ref "document.md" */>}}
|
||||||
{{</* ref "#anchor" */>}}
|
{{</* ref "#anchor" */>}}
|
||||||
{{</* ref "document#anchor" */>}}
|
{{</* ref "document.md#anchor" */>}}
|
||||||
{{</* relref "document" */>}}
|
{{</* relref "document.md" */>}}
|
||||||
{{</* relref "#anchor" */>}}
|
{{</* relref "#anchor" */>}}
|
||||||
{{</* relref "document#anchor" */>}}
|
{{</* relref "document.md#anchor" */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
The single parameter to `ref` is a string with a content `documentname` (e.g., `about.md`) with or without an appended in-document `anchor` (`#who`) without spaces.
|
The single parameter to `ref` is a string with a content `documentname` (e.g., `about.md`) with or without an appended in-document `anchor` (`#who`) without spaces.
|
||||||
@@ -120,4 +120,4 @@ Ensuring heading uniqueness across the site is accomplished with a unique identi
|
|||||||
[built-in Hugo shortcodes]: /content-management/shortcodes/#using-the-built-in-shortcodes
|
[built-in Hugo shortcodes]: /content-management/shortcodes/#using-the-built-in-shortcodes
|
||||||
[lists]: /templates/lists/
|
[lists]: /templates/lists/
|
||||||
[output formats]: /templates/output-formats/
|
[output formats]: /templates/output-formats/
|
||||||
[shortcode]: /content-management/shortcodes/
|
[shortcode]: /content-management/shortcodes/
|
||||||
Reference in new issue
Block a user