Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When Docusaurus detects a section index page - in which the slug matches the second-to-last URL path segment - it produces a route for the page with only the second-to-last path segment, omitting the slug. When migrating to the Docusaurus site, we added redirects from paths with the format `/slug/slug/` to `/slug/`. This change edits these redirects progammatically to reverse the source/destination mappings. If a redirect only maps a Docusaurus-style slug to a pre-migration index page slug, the docs engine rewrites it to map the pre-migration slug to a Docusaurus-style one. For redirect destinations that use pre-migration slugs, this change adjusts them to be Docusaurus-style slugs (this is the current redirect rewriting behavior).
- Loading branch information