Skip to content

Use the hash of the article title to provide the article url #3326

@you-hengh

Description

@you-hengh

Is your feature request related to a problem? Please describe.

In the process of daily use, non-native English speakers will use their native language to write article titles when writing articles.

However, the url obtained by such an article after publication will be encoded, resulting in the blog's post address becoming very long

Describe the solution you'd like

Here's an example.

image

After copying the url, the URL becomes like this:

https://blog.jimmyxuexue.top/front-end/%E6%8A%98%E8%85%BE/%E5%AE%9E%E7%8E%B0%E9%82%AE%E7%AE%B1%E8%BE%85%E5%8A%A9%E7%99%BB%E5%BD%95%E5%8A%9F%E8%83%BD.html

This is very inelegant in the process of sharing articles, the address is too messy, and some editing boxes will limit the number of characters.

Describe alternatives you've considered

I hope vitepress can provide a configuration item that automatically turns the article address into a hash value of the article title (preferably to control the length, such as 6 bits, 10 bits, etc.)

So even if I change the content of the article, the title of the article will not change, and the address of the article will not change

Additional context

Original url:

https://blog.jimmyxuexue.top/front-end/%E6%8A%98%E8%85%BE/%E5%AE%9E%E7%8E%B0%E9%82%AE%E7%AE%B1%E8%BE%85%E5%8A%A9%E7%99%BB%E5%BD%95%E5%8A%9F%E8%83%BD.html

Changed url:

https://blog.jimmyxuexue.top/front-end/jl34n23rnl.html

Change only the article title, keep the folder path

Validations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions