Vitepress automatically generates Chinese outline outline id

When blogging through vitepress, the outline generated by the Chinese title cannot jump normally. We must manually set an English ID for the Chinese title, as follows:

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.

This is obviously a troublesome matter for large document content, and the official has no specific plan for this.

We can modify the source code to solve this problem:

Automatically generate custom IDs so you don't have to manually generate title IDs for Chinese titles in documents

But this method is more "violent" 

Guess you like

Origin blog.csdn.net/SAXX2/article/details/132804824