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

Projects
None yet
2 participants
@benstepp
Copy link
Member

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

Enforce a starting and trailing slash on page urls
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

This comment has been minimized.

Copy link
Contributor

KyleAMathews commented Aug 4, 2016

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.