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

Post URL should not have trailing slash #7391

Closed
kirkas opened this issue Sep 15, 2016 · 7 comments
Closed

Post URL should not have trailing slash #7391

kirkas opened this issue Sep 15, 2016 · 7 comments

Comments

@kirkas
Copy link

kirkas commented Sep 15, 2016

I understand the use of trailing slash for category / tag as they somewhat represent a parent, but a post is a child url and shouldn't require slash (or at least being given the option not to have a slash).

www.blog.com/category/ is a directory / parent
www.blog.com/category/my-first-post is a file / child

It create issue with social crawler #4828
And someone already did a PR: #1028

Argument: http://stackoverflow.com/questions/5948659/when-should-i-use-a-trailing-slash-in-my-url

@halfdan
Copy link
Contributor

halfdan commented Sep 15, 2016

Hi @kirkas,
as mentioned in #4828, this is an issue with the crawler - not with Ghost.

I don't think the traditional file vs. directory comparison makes sense in today's web anymore and especially in Ghost where a blog post does not map to an actual file. There's e.g. also www.blog.com/category/my-first-post/edit which is an action on the post (and something that doesn't suddenly turn the "file" into a "directory").

All in all I think it is a matter of opinion and Ghost decided to go with trailing slashes.

@acburdine
Copy link
Member

@kirkas we use the Ghost issue tracker for issues with Ghost itself, and this is technically more of a feature request....for those we use https://ideas.ghost.org. If you like, please submit this feature request there.

Like @ErisDS said in the older issue - doing this would not likely benefit a lot of users. That being said, if you put it on the wishlist I linked above, and enough people vote on it with a desire to change it, then we can re-think this.

Personally, I agree with @halfdan's comment.

@kirkas
Copy link
Author

kirkas commented Sep 15, 2016

Yes it is a matter of opinion, and there's fair arguments on both side. the point is the config option is fairly easy to add, so why not having it and let people choose?

@acburdine
Copy link
Member

@kirkas see the above response. Also, the technical requirements of adding a config option like that are not trivial at the moment, which is why it needs to be a feature request on the wishlist first 😄

@kirkas
Copy link
Author

kirkas commented Sep 15, 2016

Fair!

@benwoodward
Copy link

This also breaks anchor links:

<a href="#example">Example headline</a> => domain.com/page-url/#example (should be: domain.com/page-url#example)

@kevinansfield
Copy link
Contributor

@benwoodward that is not a "broken" anchor link, it's the correct anchor link for a page with a trailing slash.

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

No branches or pull requests

5 participants