-
Notifications
You must be signed in to change notification settings - Fork 17
Add redirects.yml to publish renames/delations in links.json for dependent docsets. #556
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
Conversation
Thank you! @colleenmcginnis / @shainaraskas / @lcawl — I could use some input on recommended functionality for handling redirects. I called one scenario in #552, but there are a few potential scenarios writers might face. I want to make sure we're picking the most critical to focus on. Here are the scenarios I'm thinking about: Scenario 1: Moving a file Scenario 2: Splitting a page into multiple smaller pages Scenario 3: Deleting a section on a page (removing anchors) Scenario 4: Deleting an entire page Thoughts? Do any additional scenarios or considerations come to mind? I think if we're able to at least address scenario 1, we'll be in a good state to move forward with the reference move on Monday. |
@bmorelli25 another possible scenario: section moves I'm not sure whether this would work in our current situation due to our shallow url structure, but if we need to relocate entire sections, we might want to be able to support redirects that use wildcards could string together two wildcards for complex scenarios: old: /reference/fleet/* old: /reference/fleet/reference-stuff/* agree scenario 1 is all that's needed in the short term |
Thanks for those requirements @bmorelli25 I turned them in to tests and documentation here: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/556/contribute/redirects All those scenarios are now fully supported and We also now read the redirects from a This should allow us to generate redirects using the @shainaraskas having glob redirects would be another great addition to minimize the config. |
If you [move files around](move.md) or simply need to delete a few pages you might end up in a chicken-and-egg situation. The files you move or delete might still be linked to by other [documentation sets](../configure/content-set/index.md) | ||
|
||
Redirects allow you to force other documentation sets to resolve old links to their new location. | ||
This allows you to publish your changes and work to update the other documentation sets. |
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.
assume this will also just add normal redirect functionality (sorry for the worst sentence ever 🤷)
This allows you to publish your changes and work to update the other documentation sets. | |
This allows you to publish your changes and work to update the other documentation sets. | |
Redirects also allow any external links to our documentation impacted by a reorganization to resolve instead of returning a 404. |
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.
Redirects also allow any external links to our documentation impacted by a reorganization to resolve instead of returning a 404.
This is not true yet, this currently only affects our link rewriting. We don't generate redirect mappings (yet).
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 might want to say this in a note - that the redirects won't resolve for now but will in future
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.
Agreed that we should note this. I'll add in a follow-up PR so we can get this merged.
Co-authored-by: shainaraskas <[email protected]>
Documentation: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/556/contribute/redirects