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

Fix trailing slash for alt languages on home page #59

Closed
wants to merge 1 commit into from

Conversation

nbusseneau
Copy link

I think this should fix #54.

@nbusseneau
Copy link
Author

Got the idea after updating to v1.4.2 and looking at changes in #57 / #58.

@nbusseneau
Copy link
Author

@rhukster Revisiting old PRs -- not sure where #54 went, seems like it disappeared in a black hole, however the gist of it is that alternate languages are linked with a trailing slash on the home page, leading to:

  • Inconsistent navigation links based on current language (current language is non-slashed, other languages are slashed).
  • "Trailing slash jumping" between the slashed and non-slashed URL (as you click on the slashed URL but it gets unslashed by Grav routing).

Akin to #58, we check if the route is exactly / and if yes simply discard it.

@rhukster rhukster closed this in ca38f94 Jul 25, 2022
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 this pull request may close these issues.

None yet

1 participant