Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down Expand Up @@ -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

Expand Down
23 changes: 12 additions & 11 deletions CUTOVER.md
Original file line number Diff line number Diff line change
@@ -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; add redirects later if old `/masq/...` URLs matter.
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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
50 changes: 42 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const config = {
v4: true,
},

url: 'https://test-docs.masqbrowser.com',
url: 'https://docs.masqbrowser.com',
baseUrl: '/',

organizationName: 'MASQ-Project',
Expand Down Expand Up @@ -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;
},
}),
],
Expand Down
80 changes: 38 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "masq-docs",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -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",
Expand Down Expand Up @@ -45,5 +45,12 @@
},
"engines": {
"node": ">=20.0"
},
"overrides": {
"serialize-javascript": "^7.0.5",
"sockjs": {
"uuid": "^11.1.1"
},
"minimatch": "^10.0.3"
}
}
2 changes: 1 addition & 1 deletion static/CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
test-docs.masqbrowser.com
docs.masqbrowser.com
Loading