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
Docs versions fix #1105
Docs versions fix #1105
Conversation
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.
We believe this should fix the issues in #1101. I'm going to get this merged, check the stage environment, and then look to do a release here shortly so we can close this out.
RewriteRule ^docs/1.3/components/overview/(.*)$ /docs/1.3/components/components-overview/$1 [R=301,L] | ||
RewriteRule ^docs/1.3/components/overview$ /docs/1.3/components/components-overview/ [R=301,L] | ||
RewriteRule ^docs/1.2/components/overview/(.*)$ /docs/1.2/components/components-overview/$1 [R=301,L] | ||
RewriteRule ^docs/1.2/components/overview$ /docs/1.2/components/components-overview/ [R=301,L] | ||
RewriteRule ^docs/1.1/components/overview/(.*)$ /docs/1.1/components/components-overview/$1 [R=301,L] | ||
RewriteRule ^docs/1.1/components/overview$ /docs/1.1/components/components-overview/ [R=301,L] | ||
RewriteRule ^docs/1.0/components/overview/(.*)$ /docs/1.0/components/components-overview/$1 [R=301,L] | ||
RewriteRule ^docs/1.0/components/overview$ /docs/1.0/components/components-overview/ [R=301,L] | ||
RewriteRule ^docs/0.26/components/overview/(.*)$ /docs/0.26/components/components-overview/$1 [R=301,L] | ||
RewriteRule ^docs/0.26/components/overview$ /docs/0.26/components/components-overview/ [R=301,L] | ||
RewriteRule ^docs/0.25/components/overview/(.*)$ /docs/0.25/components/components-overview/$1 [R=301,L] | ||
RewriteRule ^docs/0.25/components/overview$ /docs/0.25/components/components-overview/ [R=301,L] |
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 don't think these rewrite rules are needed for the components
overview.
There are two properties on each doc related to navigation --
id
: This is an internal (to docusaurus) identifier for the doc.slug
: This is the external URL that the user hits
In this PR, we changed the id
on any of the overview docs, so that docusaurus's header navigation can find the overview documents when browsing older versions.
We didn't change slug
for any doc in this PR, though. For apis-clients and self-managed, we don't specify a slug
-- so their URL did in fact change in this PR, because docusaurus determines it from the id
. For components
, though, we do specify slug
on those overview docs -- and we specify it as /components/
. Since we didn't change it, users will continue to browse that doc at, say, /docs/1.3/components
for v1.3 -- which is the same as it was before.
The components rewrite rules aren't really hurting anything because no one will hit them (because they'll never go to docs/1.3/components/components-overview/
, they'll go to docs/1.3/components/
). But having them here might confuse us in the future.
This also might point to us not wanting to specify slug
for components overview, but I'm assuming we previously specified them for a reason.
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.
Based on your thoughts here @pepopowitz, you can PR the rewrite rules out. We don't need to create more tech debt if we can avoid it.
I think I've typed 100 different lengthy responses, which can all be similarly boiled down to this - I was using slug
to avoid some weird URL things happening for our sections and wanted to create nice landing pages with clean URLs. You'll see this on Guides, Components, and Reference (but not APIs & Clients or Self-Managed which are newer sections, where I likely forgot to add a slug
or realized it was creating other issues).
Likely a better solution is to allow people to navigate to any of those top nav level sections by nice, clean URLs with a simple redirect without slugging. Feel free to create an issue and pop it in the backlog.
* resolve self managed versioning issue * fix apis clients versioning issue * fix components version
Based on #1101, all main nav IDs changed in current version must be changed across all relevant versions. This PR should resolve this.