Hello,
I tackled issue #120 and implemented a 404 page only active under the /resources/ routes and suggests possible resources the user may have meant based off the entered link.
What I did thus far:
This uses Levenshtein distance (semantic difference of single character edits).
I've allowed for a semantic difference of 7 edits.
Had to move resources.tsx to resources/index.tsx
Added a package gatsby-plugin-remove-trailing-slashes, which treats /page and /page/ as the same page, as there were some weird routing issues
This is probably worth noting in case you have to merge, since package.json is very volatile. The version probably won't matter too much.
The current versions of gastby and react in the repository (since my fork) also fixed some routing issues, so it shouldn't be a problem.
What needs to be done (later, possibly by someone else):
Using resource layout on the resource's 404 page
I encounter very weird css issues, in which the sidebar would go to the center of the screen
Organize the output links under respective breadcrumbs
I believe there was talk about breadcrumbs and possible changing them around, but it was unnecessary for this PR
Everything seems to work fine locally as well as on a test netlify build I have. Let me know if any changes needed to done on this.
Cheers
closes #120
Hello, I tackled issue #120 and implemented a 404 page only active under the
/resources/
routes and suggests possible resources the user may have meant based off the entered link.What I did thus far:
resources.tsx
toresources/index.tsx
gatsby-plugin-remove-trailing-slashes
, which treats/page
and/page/
as the same page, as there were some weird routing issuespackage.json
is very volatile. The version probably won't matter too much.What needs to be done (later, possibly by someone else):
Everything seems to work fine locally as well as on a test netlify build I have. Let me know if any changes needed to done on this. Cheers