Skip to content

Commit

Permalink
docs: add custom anchor example (#2130)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdrag0n committed Mar 24, 2023
1 parent ae30411 commit 3991170
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/guide/markdown.md
Expand Up @@ -6,6 +6,16 @@ VitePress comes with built in Markdown Extensions.

Headers automatically get anchor links applied. Rendering of anchors can be configured using the `markdown.anchor` option.

### Custom anchors

To specify a custom anchor tag for a heading instead of using the auto-generated one, add a suffix to the heading:

```
# Using custom anchors {#my-anchor}
```

This allows you to link to the heading as `#my-anchor` instead of the default `#using-custom-anchors`.

## Links

Both internal and external links gets special treatments.
Expand Down

0 comments on commit 3991170

Please sign in to comment.