Added support for NotFoundRoute, Redirect, Pagination, Tags #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #33.
This is a preliminary revision, looking for code review, it's a litte verbose.
v0.13.x API
It adds
<NotFoundRoute handler={_404}/>
for root_template
.<Route path="/tag/:tagId" component={_tag}/>
for root_template
.<Route path="/page/:pageId" component={_pagination}/>
for root_template
and every child_template
.<Redirect from="some/where" to="somewhere/else" />
for every page that has theredirect
metadata.Inside
_404
,_tag
,_pagination
we can have appropriates Component handlers for those Routes.Since they should be optional and the missing
_404
,_tag
,_pagination
templates could crash gatsby I added the optional configurations (booleans):notFound
pagination
tags
to enable them (is there a better way?).
Notes
Since we could #32 I can wait for the branch and make the final PR there.