-
Notifications
You must be signed in to change notification settings - Fork 394
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
Change "docs/home" to "docs" #1257
Conversation
- Change sidebar.json to point Home to the new url and keep the same label. - Change DocsPage model to generate home at new url. - Swap /doc -> /doc/home redirect to the other way around. - Change link component to allow empty strings that aren't undefined.
This comment has been minimized.
This comment has been minimized.
and one minor thing I noticed - nav link (and it other places) ends with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but please check the code base for instances of doc/home
. content\blog\2020-04-30-gsod-ideas-2020.md and src\gatsby\models\docs\onCreateMarkdownContentNode.js have it, at least.
redirects-list.json
Outdated
"^/doc/?$ /doc/home 307", | ||
"^/(?:documentation)/?$ /doc", | ||
"^/(?:documentation)/(.*)?/?$ /doc/$1", | ||
"^/doc/home/?$ /doc 307", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"^/doc/home/?$ /doc 307", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per #1257 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still see this one in the code?
Part of this branch was removing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check a couple things from above:
Looks good to me, all concerns are fixed as far as I can tell. |
Why does the link on the top menu end with slash |
It's weird because it only happens whe you load the site. However if you load any area outside of docs, after clicking on docs the slash goes away once you're in the docs. Not really a problem... but funny |
@rogermparent yes, this is not good (mean prefetch does not work and most likely we hit a redirect). I actually checked this when this branch was deployed, so not sure wha't going on here. Could you please create a ticket to investigate and fix this? |
Got it, I'm not sure what's up but I'll get started investigating it. |
Looks like some leftover Sidebar link behavior was the culprit (even the top nav bar still sources from it). I've got a quick fix at #1265 now, but it's worth further decoupling the sidebar from all the links outside of itself in the future. |
Address #1073 partially
With some minor changes that allow a blank string slug in sidebar.json, this can be done without making the docs homepage a special exemption.
The existing redirect from /docs to /docs/home also had to be reversed.