Skip to content
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

Make / unnecessary at the end of URLs #931

Closed
sergeyfilimonov opened this issue Oct 14, 2018 · 5 comments · Fixed by #1269
Closed

Make / unnecessary at the end of URLs #931

sergeyfilimonov opened this issue Oct 14, 2018 · 5 comments · Fixed by #1269

Comments

@sergeyfilimonov
Copy link

sergeyfilimonov commented Oct 14, 2018

Feature request

There should be an option to remove / after a URL so that site.com/blog/ would look work as site.com/blog

What problem does this feature solve?

It removes unnecessary and ugly slash after a URL.

What does the proposed API look like?

No idea.

How should this be implemented in your opinion?

It should be configured in config.js.

Are you willing to work on this yourself?**

I would wish to work on it but no as I am not qualified enough for this.

@sergeyfilimonov sergeyfilimonov changed the title Make / unnecessary Make / unnecessary in URLs Oct 14, 2018
@sergeyfilimonov sergeyfilimonov changed the title Make / unnecessary in URLs Make / unnecessary at the end of URLs Oct 14, 2018
@martinsotirov
Copy link
Contributor

Not having a slash at the end would imply this is a file so that won't work in most browsers. You can either have "/blog/" or "/blog.html".

@sergeyfilimonov
Copy link
Author

sergeyfilimonov commented Oct 17, 2018

Not having a slash at the end would imply this is a file so that won't work in most browsers. You can either have "/blog/" or "/blog.html".

In most cases this is not the case. Actually I notice no slash in 99,9% of my web browsing experience. For instance, this issue has the URL https://github.com/vuejs/vuepress/issues/931 — no slash at the end.

@martinsotirov
Copy link
Contributor

When you're serving index.html files from nested directories, you automatically get a slash at the end. There are ways to configure your server to rewrite those requests but it's definitely not the default behavior. See this for an Apache example.

In any case, this is beyond the scope of a static site generator in my opinion.

@sergeyfilimonov
Copy link
Author

sergeyfilimonov commented Oct 17, 2018

When you're serving index.html files from nested directories, you automatically get a slash at the end. There are ways to configure your server to rewrite those requests but it's definitely not the default behavior. See this for an Apache example.

In any case, this is beyond the scope of a static site generator in my opinion.

Thanks! Didn't know about this. I guess Nginx works the same. Yes, it is unlikely about a site generator but let's give an opportunity to confirm this to someone else. If after a week, the issue will not be replied, I'll close it.

@ulivz
Copy link
Member

ulivz commented Oct 21, 2018

Thanks for your interest in VuePress, but it's duplicate of #603. Let's move there to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants