diff options
author | LisaFC <lcarey@google.com> | 2021-01-21 18:22:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-21 18:22:59 +0300 |
commit | 3c4280bae0db96cb272ddc4b4959b2beef9299af (patch) | |
tree | 050a9000300a478ef4283dff79567f0834451251 | |
parent | 196e4cd93da3091d02b74ceb12b172e780e11235 (diff) | |
parent | f1ea53e2a512e4064177ec16ea3eed85fe10ff59 (diff) |
Merge pull request #392 from mitchgrogg/patch-1
Update the Hugo ref shortcode example to be surrounded by two curly braces
-rw-r--r-- | userguide/content/en/docs/Best practices/site-guidance.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/userguide/content/en/docs/Best practices/site-guidance.md b/userguide/content/en/docs/Best practices/site-guidance.md index 16ebc5e..6063991 100644 --- a/userguide/content/en/docs/Best practices/site-guidance.md +++ b/userguide/content/en/docs/Best practices/site-guidance.md @@ -33,7 +33,7 @@ configuring your local editor to use 4 spaces when the **Tab** key is pressed. ## Linking -By default, regular relative URLs in links are left unchanged by Hugo (they're still relative links in your site's generated HTML), hence some hardcoded relative links like `[relative cross-link](../../peer-folder/sub-file.md)` might behave unexpectedly compared to how they work on your local file system. You may find it helpful to use some of Hugo's built-in [link shortcodes](https://gohugo.io/content-management/cross-references/#use-ref-and-relref) to avoid broken links in your generated site. For example a `{< ref "filename.md" >}` link in Hugo will actually +By default, regular relative URLs in links are left unchanged by Hugo (they're still relative links in your site's generated HTML), hence some hardcoded relative links like `[relative cross-link](../../peer-folder/sub-file.md)` might behave unexpectedly compared to how they work on your local file system. You may find it helpful to use some of Hugo's built-in [link shortcodes](https://gohugo.io/content-management/cross-references/#use-ref-and-relref) to avoid broken links in your generated site. For example a `{{</* ref "filename.md" */>}}` link in Hugo will actually find and automatically link to your file named `filename.md`. Note, however, that `ref` and `relref` links don't work with `_index` or `index` files (for example, this site's [content landing page](/docs/adding-content/)): you'll need to use regular Markdown links to section landing or other index pages. Specify these links relative to the site's root URL, for example: `/docs/adding-content/`. |