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

Enforce a starting and trailing slash on page urls #378

Merged
merged 1 commit into from
Aug 18, 2016

Conversation

benstepp
Copy link
Contributor

@benstepp benstepp commented Aug 4, 2016

This has been a common source of problem for users, and I think gatsby
can solve it automatically by enforcing these paths to fit a certain
criteria.

This change removes the invariant and opts to fix the path
automatically removing some of the user headache.

Basically, when a user provides a path in the frontmatter, it should
always work. Slashes are prepended and appended automatically
where necessary.

Fixes #364

This has been a common source of problem for users, and I think gatsby
can solve it automatically by enforcing these paths to fit a certain
criteria.

This change removes the invariant and opts to fix the path
automatically removing some of the user headache. It also enforces a
trailing slash for our current react-router setup.
@KyleAMathews
Copy link
Contributor

I really like this. Don't make users do something software can do. I'll review more thoroughly in a few days and release 👍

@KyleAMathews KyleAMathews merged commit bfbe313 into gatsbyjs:master Aug 18, 2016
AlexGuz23 pushed a commit to AlexGuz23/lumen that referenced this pull request Nov 3, 2022
gatsby@0.12.5 enforces trailing slashes

gatsbyjs/gatsby#378
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.

url / issue
2 participants