From c080d2840094dcb8c17a7a63801c41e95bd7ac6e Mon Sep 17 00:00:00 2001 From: KauriHero Date: Thu, 30 Jul 2026 18:05:01 +1200 Subject: [PATCH 1/4] Enhance client redirects in docusaurus.config.js for legacy paths and update CUTOVER.md with redirect details. This includes explicit mappings for non-existent pages and improved smoke-testing instructions for key links. --- CUTOVER.md | 2 +- docusaurus.config.js | 48 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/CUTOVER.md b/CUTOVER.md index 251e477..5cb502b 100644 --- a/CUTOVER.md +++ b/CUTOVER.md @@ -21,7 +21,7 @@ 4. Update DNS: point `docs.masqbrowser.com` to GitHub Pages (`masq-project.github.io` CNAME, or GitHub A records). 5. In GitHub Pages settings, confirm custom domain shows `docs.masqbrowser.com` and HTTPS is enabled. 6. Detach / remove the custom domain from GitBook so it no longer serves the old site. -7. Smoke-test key pages and external inbound links; add redirects later if old `/masq/...` URLs matter. +7. Smoke-test key pages and external inbound links. Client redirects for GitBook `/masq/...` (plus privacy-browser and `untitled-*` slug renames) are already wired in `docusaurus.config.js` via `@docusaurus/plugin-client-redirects`. ## Local commands diff --git a/docusaurus.config.js b/docusaurus.config.js index c1b98aa..2656d59 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -55,16 +55,50 @@ const config = { '@docusaurus/plugin-client-redirects', /** @type {import('@docusaurus/plugin-client-redirects').Options} */ ({ + // Explicit maps for paths that no longer exist as live pages + redirects: [ + {to: '/', from: '/masq'}, + { + to: '/advanced-use/masq-node-from-cli/configuration-methods', + from: [ + '/advanced-use/masq-node-from-cli/untitled-1', + '/masq/advanced-use/masq-node-from-cli/untitled-1', + ], + }, + { + to: '/advanced-use/common-challenges/user-permissions-real-user', + from: [ + '/advanced-use/common-challenges/untitled-2', + '/masq/advanced-use/common-challenges/untitled-2', + ], + }, + { + to: '/advanced-use/common-challenges/port-53-problems', + from: [ + '/advanced-use/common-challenges/untitled-3', + '/masq/advanced-use/common-challenges/untitled-3', + ], + }, + ], createRedirects(existingPath) { - if (!existingPath.startsWith('/masq-privacy-browser')) { - return undefined; + /** @type {string[]} */ + const from = []; + + // Homepage handled via explicit redirect (/masq). + // Do not also emit /masq/ — same stub file on disk (esp. Windows). + if (existingPath !== '/') { + from.push(`/masq${existingPath}`); } - // Old folder names kept working via client redirects - return [ - existingPath + + // Privacy-browser folder renames (with and without /masq prefix) + if (existingPath.startsWith('/masq-privacy-browser')) { + const web3Path = existingPath .replace('/masq-privacy-browser', '/masq-web3-privacy-browser') - .replace('/updating-masq-browser', '/updating-masq-web3-browser'), - ]; + .replace('/updating-masq-browser', '/updating-masq-web3-browser'); + from.push(web3Path, `/masq${web3Path}`); + } + + return from.length > 0 ? from : undefined; }, }), ], From 9576290f199fc8ccbdb32927c84cd87e2578f379 Mon Sep 17 00:00:00 2001 From: KauriHero Date: Thu, 30 Jul 2026 18:11:37 +1200 Subject: [PATCH 2/4] Update package dependencies in package.json and package-lock.json, including major version upgrades for balanced-match, brace-expansion, minimatch, and serialize-javascript. Added engine requirements and funding information for minimatch. Adjusted linting command for consistency and added overrides for specific packages. --- package-lock.json | 76 ++++++++++++++++++++++------------------------- package.json | 9 +++++- 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index 53a7dbd..fe40075 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7613,10 +7613,13 @@ } }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } }, "node_modules/baseline-browser-mapping": { "version": "2.11.7", @@ -7744,13 +7747,15 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.17", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.17.tgz", - "integrity": "sha512-w+aeW/mkgM4PyRMOJCgi3fOrTm5Q8QY1OSfn2TO2iuDj3ezIHqejmuxbjfPrqUkgqRew1iqkyAn0tr0ZwHD9+w==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.8.tgz", + "integrity": "sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/braces": { @@ -8372,12 +8377,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT" - }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -14960,15 +14959,18 @@ "license": "ISC" }, "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "license": "ISC", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^5.0.8" }, "engines": { - "node": "*" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { @@ -17470,15 +17472,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/range-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", @@ -18481,12 +18474,12 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.7.tgz", + "integrity": "sha512-YAy8Od6KV+uuwUuU50np8fGB/Aues6Y0nAhA9y/hId74PlKUcme4pXcBD46NWKr1Q4osN/iseZ17YqO1XfmI8g==", "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" + "engines": { + "node": ">=20.0.0" } }, "node_modules/serve-handler": { @@ -20025,13 +20018,16 @@ } }, "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist/esm/bin/uuid" } }, "node_modules/value-equal": { diff --git a/package.json b/package.json index ee35e90..dc46bea 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "lint": "eslint \"**/*.{js,jsx,ts,tsx,mjs,cjs}\"" + "lint": "eslint . --ext .js,.jsx,.ts,.tsx,.mjs,.cjs" }, "dependencies": { "@docusaurus/core": "3.10.2", @@ -45,5 +45,12 @@ }, "engines": { "node": ">=20.0" + }, + "overrides": { + "serialize-javascript": "^7.0.5", + "sockjs": { + "uuid": "^11.1.1" + }, + "minimatch": "^10.0.3" } } From c98f184c9be1a66ebf894591cafeec690cbb8d54 Mon Sep 17 00:00:00 2001 From: KauriHero Date: Thu, 30 Jul 2026 18:14:02 +1200 Subject: [PATCH 3/4] Update version to 1.0.1 in package.json and package-lock.json for release. --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index fe40075..703fbf6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "masq-docs", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "masq-docs", - "version": "1.0.0", + "version": "1.0.1", "dependencies": { "@docusaurus/core": "3.10.2", "@docusaurus/faster": "3.10.2", diff --git a/package.json b/package.json index dc46bea..ad14e82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "masq-docs", - "version": "1.0.0", + "version": "1.0.1", "private": true, "scripts": { "docusaurus": "docusaurus", From 6e38df9646edf5b582548b2b32a7730cfa748488 Mon Sep 17 00:00:00 2001 From: KauriHero Date: Thu, 30 Jul 2026 18:15:25 +1200 Subject: [PATCH 4/4] Update URL in docusaurus.config.js and CNAME file to reflect the new documentation domain. --- AGENTS.md | 6 +++--- CUTOVER.md | 23 ++++++++++++----------- README.md | 2 +- docusaurus.config.js | 2 +- static/CNAME | 2 +- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 97f2a63..a5d8ccc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,8 +8,8 @@ Public **MASQ Network documentation** site: **Docusaurus 3** → **GitHub Pages* | | | |---|---| -| Live (test) | https://test-docs.masqbrowser.com | -| Prod (planned) | https://docs.masqbrowser.com — see [`CUTOVER.md`](CUTOVER.md) | +| Live | https://docs.masqbrowser.com | +| Staging (former) | https://test-docs.masqbrowser.com — see [`CUTOVER.md`](CUTOVER.md) | | GitHub | https://github.com/MASQ-Project/masq-docs | | Content | `docs/**/*.mdx` | | Assets | `static/img/assets/` (kebab-case filenames) | @@ -114,7 +114,7 @@ npm run build - Pages source: **GitHub Actions** (not `gh-pages` branch upload by hand). - Test domain is configured via `url` in `docusaurus.config.js` and `static/CNAME`. - Subdomains need a **CNAME → `masq-project.github.io`** only (no GitHub A records unless apex). -- Production cutover steps: follow [`CUTOVER.md`](CUTOVER.md) exactly; do not flip `docs.masqbrowser.com` without user confirmation. +- Production domain cutover: follow [`CUTOVER.md`](CUTOVER.md); confirm DNS / Pages / GitBook detach after merging to `main`. ## Current hardening focus diff --git a/CUTOVER.md b/CUTOVER.md index 5cb502b..6f75622 100644 --- a/CUTOVER.md +++ b/CUTOVER.md @@ -1,27 +1,28 @@ # Cutover: test-docs → docs.masqbrowser.com -## Current (test) +## Current (production config in repo) | Item | Value | |------|--------| | Repo | https://github.com/MASQ-Project/masq-docs | -| Config `url` | `https://test-docs.masqbrowser.com` | -| `static/CNAME` | `test-docs.masqbrowser.com` | +| Config `url` | `https://docs.masqbrowser.com` | +| `static/CNAME` | `docs.masqbrowser.com` | | GitHub Pages | Settings → Pages → Source: **GitHub Actions** | -| DNS | CNAME `test-docs` → `masq-project.github.io` | | Working branch | `dev` (staging). Only merges to `main` publish Pages. | -## When ready for production +Former staging domain: `test-docs.masqbrowser.com` (CNAME → `masq-project.github.io`). + +## Cutover checklist 1. Lower DNS TTL on `docs.masqbrowser.com` ahead of time if possible. -2. In this repo, change: +2. [x] In this repo, change: - `docusaurus.config.js` → `url: 'https://docs.masqbrowser.com'` - `static/CNAME` → `docs.masqbrowser.com` -3. Merge `dev` → `main` (or commit and push to `main`) so Actions redeploy. -4. Update DNS: point `docs.masqbrowser.com` to GitHub Pages (`masq-project.github.io` CNAME, or GitHub A records). -5. In GitHub Pages settings, confirm custom domain shows `docs.masqbrowser.com` and HTTPS is enabled. -6. Detach / remove the custom domain from GitBook so it no longer serves the old site. -7. Smoke-test key pages and external inbound links. Client redirects for GitBook `/masq/...` (plus privacy-browser and `untitled-*` slug renames) are already wired in `docusaurus.config.js` via `@docusaurus/plugin-client-redirects`. +3. [ ] Merge `dev` → `main` (or commit and push to `main`) so Actions redeploy. +4. [ ] Update DNS: point `docs.masqbrowser.com` to GitHub Pages (`masq-project.github.io` CNAME only for the subdomain). +5. [ ] In GitHub Pages settings, confirm custom domain shows `docs.masqbrowser.com` and HTTPS is enabled / Enforce HTTPS. +6. [ ] Detach / remove the custom domain from GitBook so it no longer serves the old site. +7. [ ] Smoke-test key pages and external inbound links. Client redirects for GitBook `/masq/...` (plus privacy-browser and `untitled-*` slug renames) are wired in `docusaurus.config.js` via `@docusaurus/plugin-client-redirects`. ## Local commands diff --git a/README.md b/README.md index db71589..b079e33 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Public documentation site for MASQ Network, built with [Docusaurus](https://docusaurus.io/). -- **Test URL:** https://test-docs.masqbrowser.com +- **Live URL:** https://docs.masqbrowser.com - **Source content migrated from:** [masq-public-docs](https://github.com/MASQ-Project/masq-public-docs) (GitBook markdown backup) - **Branches:** work on `dev` (staging); merge to `main` to deploy GitHub Pages diff --git a/docusaurus.config.js b/docusaurus.config.js index 2656d59..fdc7633 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -11,7 +11,7 @@ const config = { v4: true, }, - url: 'https://test-docs.masqbrowser.com', + url: 'https://docs.masqbrowser.com', baseUrl: '/', organizationName: 'MASQ-Project', diff --git a/static/CNAME b/static/CNAME index 43248f3..de8b459 100644 --- a/static/CNAME +++ b/static/CNAME @@ -1 +1 @@ -test-docs.masqbrowser.com +docs.masqbrowser.com