hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
38.82k stars 4.75k forks source link

The "#" character is not supported in file names, which may result in the path not being found. #5428

Open ihuadz opened 4 months ago

ihuadz commented 4 months ago

Check List

Feature Request

I hope the issue with file names containing special characters like "#" can be fixed. When writing articles about C#, I encounter this problem. Although I can use "CSharp" as a substitute, I hope this can make the product better and better.

Others

No response

uiolee commented 3 months ago

#

hexo normally generates files with # in the file name. # will be treated by the browser as an anchor instead of a path. This is not caused by hexo.

ihuadz commented 3 months ago

#

hexo normally generates files with # in the file name. # will be treated by the browser as an anchor instead of a path. This is not caused by hexo.

I see what you mean, I'm wondering if this can be solved by url encoding when generating file names that contain special characters ^-^

uiolee commented 3 months ago

# is a legal character in URL. Neither url api nor encodeurl() escape it

uiolee commented 3 months ago

For individual post, you can define permalink in Front-matter

ihuadz commented 3 months ago

For individual post, you can define permalink in Front-matter

Understood, thank you