Skip to content

Replace legacy FreeSWITCH docs with the new Users Manual#293

Merged
Devon-White merged 8 commits into
mainfrom
replace-site-with-new-manual
Jun 8, 2026
Merged

Replace legacy FreeSWITCH docs with the new Users Manual#293
Devon-White merged 8 commits into
mainfrom
replace-site-with-new-manual

Conversation

@Devon-White

Copy link
Copy Markdown
Collaborator

Summary

Replaces the old ~1,685-page Confluence-migrated docs with the new, concise FreeSWITCH Users Manual (36 pages), keeping the deployment layer (Dockerfile, nginx, CI) intact so the same image keeps serving at developer.signalwire.com/freeswitch/.

Three commits:

  1. Redirect legacy docs → new homepage — nginx regex rules in provisioning/nginx/redirects.map send all /freeswitch/FreeSWITCH-Explained/*, /freeswitch/Channel-Variables-Catalog/*, and the retired community/office-hours page to /freeswitch/ (each with a leading-slash + no-leading-slash form). Also ignores /temp.
  2. Replace site content — swap docs/, sidebars.js, src/css, static/img, README + TABLE-OF-CONTENTS for the new manual. Reconcile docusaurus.config.js: keep baseUrl: /freeswitch/, point editUrl at this repo, restore the Typesense search theme + tracking scripts, use the new navbar/branding. Drop obsolete Confluence static assets and old theme/component overrides. typesense.json: remove the stale Channel-Variables-Catalog stop-URL.
  3. Pin Docusaurus deps to 3.9.2 — a stray npm install had drifted the caret ranges into a mixed core@3.9.2 + plugin-content-pages@3.10.1 tree that crashed the build (Cannot read properties of undefined (mdxCrossCompilerCache)). Pin all @docusaurus/* to exact 3.9.2 (they must move in lockstep) and pin remaining caret deps to installed versions.

Verification

  • npm run build passes with strict onBrokenLinks: "throw" — no broken links/images.
  • Real production Docker image (npm ci + build + nginx) builds clean and serves: new homepage, slug pages, /freeswitch/search, and tracking scripts all return 200.
  • Redirect regression against the old site's full sitemap (1,690 URLs): 1,685 → 301 → /freeswitch/; /freeswitch/ now serves the new manual (200); search regenerated.

Known / out of scope

  • 3 old Docusaurus auto-generated taxonomy pages (/freeswitch/tags, /tags/introduction, /tags/examples) now 404 — not authored content. Optional one-line redirect available if we want them funneled to the homepage too.

Add nginx regex rules so all legacy /freeswitch/FreeSWITCH-Explained/* and
/freeswitch/Channel-Variables-Catalog/* URLs (plus the retired community/office-hours
page) 301 to /freeswitch/. Each rule has a leading-slash and no-leading-slash form.
Verified against the old site's sitemap (1,685 URLs) in an nginx container.

Also ignore /temp (staging area for the new-site migration).
Swap the ~1,685-page Confluence-migrated docs for the new 36-page Users Manual
(docs/, sidebars.js, src/css, static/img, README, TABLE-OF-CONTENTS). Reconcile
docusaurus.config.js: keep deployment baseUrl /freeswitch/, point editUrl at this
repo, restore the Typesense search theme + tracking scripts, use the new navbar/
branding. Drop obsolete Confluence static assets and the old theme/component
overrides. typesense.json: remove the stale Channel-Variables-Catalog stop URL.

Deployment layer (Dockerfile, provisioning/nginx, CI, config/typesense.js) is
unchanged. Verified: docusaurus build passes (strict onBrokenLinks), new pages
serve 200 behind the real nginx config, and legacy URLs still 301 to /freeswitch/.
A stray npm install had drifted the caret ranges (^3.9.2) into a mixed tree
(core 3.9.2 + preset-classic/plugin-content-pages 3.10.1), which crashed the
build: plugin-content-pages@3.10.1 reads siteConfig.future.faster, absent in
core@3.9.2 -> 'Cannot read properties of undefined (mdxCrossCompilerCache)'.

Pin all @docusaurus/* to exact 3.9.2 (they must move in lockstep) and pin the
remaining caret deps to their installed versions so npm install can no longer
drift the tree. Build verified.
@Devon-White Devon-White requested a review from a team as a code owner June 4, 2026 16:19
Drop the 'part-N-' prefix from the generated-index category slugs so the URLs
are the bare topic (e.g. /freeswitch/part-1-foundations -> /freeswitch/foundations,
/applications, /dialplan, /reference, ...). Sidebar labels keep their 'Part N:'
numbering. Also tighten link checking (onBrokenAnchors/onBrokenMarkdownLinks/
onBrokenMarkdownImages -> throw, trailingSlash: false). Build verified.
Replace the hand-maintained explicit sidebar (and generated-index category
links) with a fully autogenerated sidebar driven by the docs/ tree:

- sidebars.js: single { type: autogenerated, dirName: '.' } — new chapters
  appear automatically just by adding a file.
- Add an index.mdx per part folder that renders <DocCardList /> (the same card
  grid Docusaurus' generated-index used), auto-populating that section's
  children. Each owns its URL via an explicit slug (/foundations, /applications,
  ...).
- Add _category_.json per folder for the 'Part N:' label + order; sidebar_position
  on each chapter preserves the manual's reading order.
- Nest child slugs under their section for consistency
  (/introduction -> /foundations/introduction, /configuration/xml ->
  /configuration-system/xml, /endpoints/* -> /users-and-endpoints/*,
  /media/* -> /media-and-codecs/*).

Build verified clean (strict onBrokenLinks/onBrokenAnchors/onBrokenMarkdownLinks).
Add a content-specific description to every chapter and the homepage (the 8
category index pages already had them). These populate the page <meta
name=description> for SEO and the <DocCardList /> card subtitles on the section
landing pages. Build verified clean.
Both are reachable from the sidebar in the docs view, so the left-aligned
navbar links were redundant. Keep only the GitHub link on the right.
@Devon-White Devon-White merged commit 5946023 into main Jun 8, 2026
1 check passed
@Devon-White Devon-White deleted the replace-site-with-new-manual branch June 8, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants