-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Remove '.html' extension from URLs #1060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your great work, but this feature would affect all the old websites and some people would still prefer the URLs with .html
suffix, I think it's better to create a config (e.g. htmlSuffix
, defaults to true) for this feature.
@ulivz I created a possible solution. But it makes a lot of functions dependent on the |
6c3127f
to
71574f2
Compare
316e022
to
1284944
Compare
Any update on this? It's the main blocker for me if I'm ever going to consider VuePress. I know a lot of people want it, and have tried to solve it (me included), but I think we need help from the main developers of VuePress to do it. |
Unfortunately I don't have time to work on this currently. I'm closing the PR as it is out of date and has too many conflicts. |
Understandable. Thanks for the effort. |
See #1339 |
Summary
As discussed in #608 and a few other issues, it would be nice to enhance user experience regarding URLs created by vuepress. I want to make a first step towards this goal with this PR and removed the
.html
extension at the end of all URLs. So the URL/about.html
gets/about/
.However, there is some more work to be done.
When I start a project with
vuepress dev
and request a URL without the trailing/
, the router gets into an infinite loop and a blank website is shown.Generally the trailing
/
should be removed from all URLs. Removing the.html
extension is only the first step and I wouldn't ship this to production as is.Some refactoring might be needed as a lot of code was built with the URL extension in mind.
I'm open for suggestions and help.
What kind of change does this PR introduce? (check at least one)
If changing the UI of default theme, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)You have tested in the following browsers: (Providing a detailed version will be better.)
If adding a new feature, the PR's description includes:
→ This comment from awulkan has some convincing reasons.
To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Other information:
I'm not sure if I have enough time to go though all the points mentioned in the summary. If anyone wants to pick up from my work, feel free to fork from my repo and continue working on that.