diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-26 11:04:57 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-26 11:04:57 +0200 |
commit | d7497b28c17fe2f402accde45c75642ed7f09d08 (patch) | |
tree | ec560802471331c111fb1fec0fd639509c50560d /docs/content/en/functions/anchorize.md | |
parent | 94459680ba391275ac667407627cafdab5a50d79 (diff) | |
parent | d276e901b36d2576ef8350ed96b17f66254eac1b (diff) |
Merge commit 'd276e901b36d2576ef8350ed96b17f66254eac1b'
Diffstat (limited to 'docs/content/en/functions/anchorize.md')
-rw-r--r-- | docs/content/en/functions/anchorize.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/content/en/functions/anchorize.md b/docs/content/en/functions/anchorize.md index 87aea2354..b5bd22e07 100644 --- a/docs/content/en/functions/anchorize.md +++ b/docs/content/en/functions/anchorize.md @@ -17,11 +17,11 @@ If [Goldmark](https://gohugo.io/getting-started/configuration-markup#goldmark) i Since the `defaultMarkdownHandler` and this template function use the same sanitizing logic, you can use the latter to determine the ID of a header for linking with anchor tags. -``` -{{anchorize "This is a header"}} → "this-is-a-header" -{{anchorize "This is also a header"}} → "this-is-also-a-header" -{{anchorize "main.go"}} → "main-go" -{{anchorize "Article 123"}} → "article-123" -{{anchorize "<- Let's try this, shall we?"}} → "let-s-try-this-shall-we" -{{anchorize "Hello, 世界"}} → "hello-世界" +```go-html-template +{{ anchorize "This is a header" }} --> "this-is-a-header" +{{ anchorize "This is also a header" }} --> "this-is-also----a-header" +{{ anchorize "main.go" }} --> "maingo" +{{ anchorize "Article 123" }} --> "article-123" +{{ anchorize "<- Let's try this, shall we?" }} --> "--lets-try-this-shall-we" +{{ anchorize "Hello, 世界" }} --> "hello-世界" ``` |