Skip to content

Commit

Permalink
add note on linking to headings (withastro#5300)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
ElianCodes and delucis authored Nov 7, 2023
1 parent 4c17b53 commit 8f285ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/content/docs/en/guides/markdown-content.mdx
Original file line number Diff line number Diff line change
@@ -119,6 +119,8 @@ I can link internally to [my conclusion](#conclusion) on the same page when writ
I can use the URL `https://example.com/page-1/#introduction` to navigate directly to my Introduction on the page.
```

Astro generates heading `id`s based on `github-slugger`. You can find more examples in [the github-slugger documentation](https://github.com/Flet/github-slugger#usage).

### Escaping special characters

Certain characters have a special meaning in Markdown and MDX. You may need to use a different syntax if you want to display them. To do this, you can use [HTML entities](https://developer.mozilla.org/en-US/docs/Glossary/Entity) for these characters instead.

0 comments on commit 8f285ba

Please sign in to comment.