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 paths more flexible #34

Merged
merged 4 commits into from
Jan 22, 2018
Merged

Make paths more flexible #34

merged 4 commits into from
Jan 22, 2018

Conversation

kalinchernev
Copy link
Contributor

That's how #31 would be fixed.
Summary of changes:

  • upgrades of the core and its deps solves GraphQLError: Cannot read property 'id' of undefined errors
  • the additional check for window presence is documented - with it, there are no issues during build time when netlify global is not in the window
  • path is passed to the context in order to match user-provided values and what the app will show to the user and in end build bundle.

I've left one example of a path without the slash for demo purposes and prettier automatically reformatted some parts.

To test, first try to build current master with path change in a post. When running the build process, there will be an error as described in #31
Then, pull this branch, run yarn to get updated packages and try again.

@erquhart
Copy link
Contributor

erquhart commented Jan 20, 2018

Good fix here, didn't realize we could work around the slash this way. I'd like to see this starter get to the point where the path field can be removed from the entry entirely and simply generated (that requirement is unique to Gatsby), but there are a few considerations there, probably better to attempt once decaporg/decap-cms#445 happens.

@AustinGreen AustinGreen merged commit 93e0de4 into decaporg:master Jan 22, 2018
csw1995 pushed a commit to csw1995/unused-blog that referenced this pull request Aug 14, 2019
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

3 participants