De-version PPE latest docs to bare product path - #1506
Conversation
12.0 now serves at /docs/passwordpolicyenforcer instead of /docs/passwordpolicyenforcer/12_0. Older versions (11.2, 11.1, 11.0, 10.2) are removed from the active build but left untouched on disk. Old versioned URLs redirect to the unversioned docs root: known version roots get a real static redirect, and any other stale deep link falls back to a client-side redirect via a new opt-in redirectStaleVersionsToRoot mechanism that leaves other de-versioned products' path-preserving redirects unchanged.
12.0, 11.2, 11.1, and 11.0 share the same section layout, so old links into them now resolve to the exact same page under the new unversioned root (derived by walking the 12.0 doc tree and checking each file also exists in the older version, rather than hand-listing every page). 10.2's layout was reorganized for 11.x/12.0, so its old pages use an explicit, content-verified old-path -> new-path map instead of a blind path rewrite. Anything with no clear one-to-one match on either version still falls back to the docs root via the existing client-side redirect.
A folder-index route (e.g. admin/cmdlets, whose file shares its parent folder's name) was only registered as a redirect with a trailing slash, so the plain /admin/cmdlets URL a reader actually types missed it and fell through to the generic root fallback instead.
npm run start runs in development mode, where the gtag script often can't load (network, ad blockers), leaving window.gtag undefined and throwing a runtime error overlay on every route change. Production builds are unaffected.
Read each previously-unmapped 10.2 page's title/content and matched it to whichever 12.0 page now covers that topic: mailer/license settings consolidated into Settings, uninstall steps into the server installer, Support Tools into System Audit and Support, first/last-character and username-similarity rules into Character rules and Similarity, and password client template/insert/multilingual customization into its configuration page. Only administration/password_reset.md is still left unmapped — it covered integration with the separate Password Reset product and has no PPE-side equivalent in 12.0.
It was an intro/comparison blurb for the separate Netwrix Password Reset product, not integration documentation — that same PPE Web vs. Password Reset comparison now lives in the Web overview page, so redirect there instead of falling back to the docs root.
Docusaurus serves a doc whose filename matches its parent folder at the folder URL, dropping the repeated segment. Four TEN_TWO_PAGE_MAP keys still had the repeated segment, so they never matched the URLs 10.2 actually served (e.g. /administration/rules/rules instead of /administration/rules). Generated with AI Co-Authored-By: Claude Code <ai@netwrix.com>
Code ReviewReviewed for correctness only (no doc content/style). No security issues, no workflow/permission/secret changes, and the Docusaurus wiring is sound: excluding PPE from the base-path redirect list avoids the self-redirect no-op, Findings below, most significant first. 1. 11.1 and 11.0 are not structurally identical to 12.0, so ~9 pages each get no redirect
2. PPE pages now emit an empty
Extending the fallback to cover "single-version product whose route base path equals the product path" (the same signal already encoded as 3. Old
4. Latent: a subfolder
5. The gtag gate probably does not fix the reported dev error
6. Stale guidance file
|
Summary
Test plan
DOCS_PRODUCT=passwordpolicyenforcer npm run buildand confirm no broken links