Skip to content

Upgrade to Docusaurus 3#3144

Open
karlcarstensen wants to merge 13 commits into
mainfrom
docusaurus-3
Open

Upgrade to Docusaurus 3#3144
karlcarstensen wants to merge 13 commits into
mainfrom
docusaurus-3

Conversation

@karlcarstensen
Copy link
Copy Markdown
Collaborator

Summary

Brings the docs site green on Docusaurus 3 with future.v4: true and trailingSlash: true. Five categories of mechanical changes plus targeted swizzle rewrites for the CodeBlock theme refactor.

What changed

1. MDX 3 syntax compliance (~595 doc files)

  • HTML comments → MDX comments in 562 .md/.mdx files: → {/* … */}. Verified safe — zero occurrences inside fenced code blocks across the repo.
  • Admonition titles → bracketed syntax in 33 files (174 instances): :::note Title → :::note[Title]. The space-separated form no longer parses in Docusaurus 3 and was rendering as literal text (e.g., empty Progress Checklist admonitions on the GitLab installation pages).

2. CodeBlock theme swizzle migration (src/theme/CodeBlock/)

Docusaurus 3 rewrote the CodeBlock components around a new context provider + slot-based architecture. The site's three customizations (CustomizableValue integration in titles, copy handler, and line tokens) were ported.

3. Redirect collisions (2 deletions)

Removed docs/library/stay-up-to-date/{updating,versioning}.md. These pages had been superseded by /2.0/docs/library/guides/updating-modules and /versioning, with redirects already in src/redirects.js. The new client-redirects plugin refuses to overwrite real pages (older versions silently ignored this).

4. Internal link rewrites (~131 doc files)

Replaced 148 internal references to the deleted pages with their /2.0/docs/library/guides/... equivalents. Docusaurus 3's broken-link checker no longer trusts redirect targets, so links must point to canonical URLs.

5. Trailing-slash relative-path fixes (14 files)

The trailingSlash: true change broke a small number of pre-existing relative links (now resolving one directory deeper than intended). Converted to absolute paths or corrected ../ depth in:

  • docs/ecs-deploy-runner/maintain/{extending,updating}.md
  • docs/infrastructure-pipelines/security/{audit-log,branch-protection,controls,machine-users,multi-account,repository-access}.md
  • docs/infrastructure-pipelines/{hello-world/github-enterprise,overview/actions}.md
  • docs/guides/stay-up-to-date/cis/cis-1.5.0/deployment-walkthrough/step-{3,4,5}-*.md
  • docs/guides/stay-up-to-date/terraform/terraform-14/deployment-walkthrough/step-1-*.md
  • docs/refarch/usage/maintain-your-refarch/extending.md

6. Segment plugin runtime guard

Added src/clientModules/segmentShim.js, registered in docusaurus.config.js. The unmaintained @twilio-labs/docusaurus-plugin-segment@0.1.0 (peer-deps React 16/17) loads its onRouteDidUpdate callback in Docusaurus 3 dev mode despite skipping the inline init snippet, leaving window.analytics undefined and crashing on navigation. The shim defines window.analytics as a no-op fallback, which also hardens production against ad-blockers/CSP that block the Segment loader.

Test plan

  • yarn build exits green (currently: [SUCCESS] Generated static files in "build" in ~13s)
  • yarn start — navigate between pages, no Segment runtime error
  • Spot-check Progress Checklist admonitions render (e.g. /2.0/docs/pipelines/installation/addingexistinggitlabrepo)
  • CodeBlock visual parity with live site:
    • /2.0/docs/pipelines/installation/addinggitlabrepo (120 code blocks + $$markers$$ + titles — biggest stress test)
    • /test-customizable-value (interactive click-to-edit + sessionStorage)
    • /reference/services/app-orchestration/amazon-eks-core-services (456 code blocks at scale)
  • Copy button preserves $$marker$$ substitution when copying code with customizable values
  • Confirm /library/stay-up-to-date/updating still redirects (external-bookmark compatibility)

Out of scope

  • HTML minifier "broken anchor" warnings (default 'warn', not blocking; pre-existing)
  • ~22 broken anchors in reference docs (pre-existing, unrelated to this migration)
  • Removing the unmaintained @twilio-labs/docusaurus-plugin-segment dependency (shim makes it safe; replacement is a separate decision)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 15, 2026 7:53pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Important

Review skipped

Too many files!

This PR contains 300 files, which is 150 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f55549df-c36a-489b-a3e5-9ab84bbf5737

📥 Commits

Reviewing files that changed from the base of the PR and between 5c1be0c and 77ac378.

📒 Files selected for processing (300)
  • .gitignore
  • README.md
  • docs/2.0/docs/library/guides/integrate-tfc.md
  • docs/2.0/docs/library/tutorials/deploying-your-first-gruntwork-module.md
  • docs/2.0/docs/overview/concepts/gruntworkplatform.md
  • docs/2.0/docs/patcher/guides/promotion-workflows.md
  • docs/2.0/docs/patcher/tutorials/applying-first-patch.md
  • docs/2.0/docs/patcher/tutorials/authoring-first-patch.md
  • docs/2.0/docs/pipelines/guides/extending-pipelines.md
  • docs/2.0/docs/pipelines/installation/addingexistinggitlabrepo.mdx
  • docs/2.0/docs/pipelines/installation/addingexistingrepo.mdx
  • docs/2.0/docs/pipelines/installation/addinggitlabrepo.mdx
  • docs/2.0/docs/pipelines/installation/addingnewrepo.mdx
  • docs/2.0/docs/pipelines/previous-versions/upgrading-from-ecs-deploy-runner.md
  • docs/2.0/docs/pipelines/previous-versions/upgrading-from-infrastructure-pipelines.md
  • docs/2.0/docs/pipelines/previous-versions/upgrading-github-v3-to-v4.md
  • docs/2.0/docs/pipelines/previous-versions/upgrading-gitlab-v1-to-v2.md
  • docs/2.0/docs/pipelines/tutorials/deploying-your-first-infrastructure-change.mdx
  • docs/2.0/docs/pipelines/tutorials/destroying-infrastructure.mdx
  • docs/2.0/way/why/velocity.md
  • docs/courses.mdx
  • docs/discussions/knowledge-base/10.mdx
  • docs/discussions/knowledge-base/101.mdx
  • docs/discussions/knowledge-base/103.mdx
  • docs/discussions/knowledge-base/104.mdx
  • docs/discussions/knowledge-base/105.mdx
  • docs/discussions/knowledge-base/106.mdx
  • docs/discussions/knowledge-base/107.mdx
  • docs/discussions/knowledge-base/108.mdx
  • docs/discussions/knowledge-base/109.mdx
  • docs/discussions/knowledge-base/11.mdx
  • docs/discussions/knowledge-base/110.mdx
  • docs/discussions/knowledge-base/111.mdx
  • docs/discussions/knowledge-base/112.mdx
  • docs/discussions/knowledge-base/117.mdx
  • docs/discussions/knowledge-base/119.mdx
  • docs/discussions/knowledge-base/12.mdx
  • docs/discussions/knowledge-base/121.mdx
  • docs/discussions/knowledge-base/124.mdx
  • docs/discussions/knowledge-base/125.mdx
  • docs/discussions/knowledge-base/126.mdx
  • docs/discussions/knowledge-base/127.mdx
  • docs/discussions/knowledge-base/128.mdx
  • docs/discussions/knowledge-base/129.mdx
  • docs/discussions/knowledge-base/13.mdx
  • docs/discussions/knowledge-base/130.mdx
  • docs/discussions/knowledge-base/131.mdx
  • docs/discussions/knowledge-base/132.mdx
  • docs/discussions/knowledge-base/133.mdx
  • docs/discussions/knowledge-base/134.mdx
  • docs/discussions/knowledge-base/135.mdx
  • docs/discussions/knowledge-base/137.mdx
  • docs/discussions/knowledge-base/138.mdx
  • docs/discussions/knowledge-base/139.mdx
  • docs/discussions/knowledge-base/14.mdx
  • docs/discussions/knowledge-base/141.mdx
  • docs/discussions/knowledge-base/143.mdx
  • docs/discussions/knowledge-base/144.mdx
  • docs/discussions/knowledge-base/146.mdx
  • docs/discussions/knowledge-base/148.mdx
  • docs/discussions/knowledge-base/149.mdx
  • docs/discussions/knowledge-base/15.mdx
  • docs/discussions/knowledge-base/150.mdx
  • docs/discussions/knowledge-base/151.mdx
  • docs/discussions/knowledge-base/152.mdx
  • docs/discussions/knowledge-base/156.mdx
  • docs/discussions/knowledge-base/16.mdx
  • docs/discussions/knowledge-base/160.mdx
  • docs/discussions/knowledge-base/162.mdx
  • docs/discussions/knowledge-base/163.mdx
  • docs/discussions/knowledge-base/164.mdx
  • docs/discussions/knowledge-base/165.mdx
  • docs/discussions/knowledge-base/166.mdx
  • docs/discussions/knowledge-base/167.mdx
  • docs/discussions/knowledge-base/168.mdx
  • docs/discussions/knowledge-base/169.mdx
  • docs/discussions/knowledge-base/17.mdx
  • docs/discussions/knowledge-base/170.mdx
  • docs/discussions/knowledge-base/171.mdx
  • docs/discussions/knowledge-base/172.mdx
  • docs/discussions/knowledge-base/173.mdx
  • docs/discussions/knowledge-base/174.mdx
  • docs/discussions/knowledge-base/175.mdx
  • docs/discussions/knowledge-base/176.mdx
  • docs/discussions/knowledge-base/178.mdx
  • docs/discussions/knowledge-base/18.mdx
  • docs/discussions/knowledge-base/180.mdx
  • docs/discussions/knowledge-base/181.mdx
  • docs/discussions/knowledge-base/182.mdx
  • docs/discussions/knowledge-base/185.mdx
  • docs/discussions/knowledge-base/186.mdx
  • docs/discussions/knowledge-base/187.mdx
  • docs/discussions/knowledge-base/189.mdx
  • docs/discussions/knowledge-base/19.mdx
  • docs/discussions/knowledge-base/190.mdx
  • docs/discussions/knowledge-base/192.mdx
  • docs/discussions/knowledge-base/194.mdx
  • docs/discussions/knowledge-base/195.mdx
  • docs/discussions/knowledge-base/196.mdx
  • docs/discussions/knowledge-base/197.mdx
  • docs/discussions/knowledge-base/20.mdx
  • docs/discussions/knowledge-base/200.mdx
  • docs/discussions/knowledge-base/201.mdx
  • docs/discussions/knowledge-base/202.mdx
  • docs/discussions/knowledge-base/203.mdx
  • docs/discussions/knowledge-base/205.mdx
  • docs/discussions/knowledge-base/206.mdx
  • docs/discussions/knowledge-base/207.mdx
  • docs/discussions/knowledge-base/208.mdx
  • docs/discussions/knowledge-base/209.mdx
  • docs/discussions/knowledge-base/21.mdx
  • docs/discussions/knowledge-base/211.mdx
  • docs/discussions/knowledge-base/212.mdx
  • docs/discussions/knowledge-base/213.mdx
  • docs/discussions/knowledge-base/215.mdx
  • docs/discussions/knowledge-base/216.mdx
  • docs/discussions/knowledge-base/217.mdx
  • docs/discussions/knowledge-base/218.mdx
  • docs/discussions/knowledge-base/219.mdx
  • docs/discussions/knowledge-base/22.mdx
  • docs/discussions/knowledge-base/220.mdx
  • docs/discussions/knowledge-base/221.mdx
  • docs/discussions/knowledge-base/222.mdx
  • docs/discussions/knowledge-base/223.mdx
  • docs/discussions/knowledge-base/224.mdx
  • docs/discussions/knowledge-base/225.mdx
  • docs/discussions/knowledge-base/226.mdx
  • docs/discussions/knowledge-base/227.mdx
  • docs/discussions/knowledge-base/228.mdx
  • docs/discussions/knowledge-base/229.mdx
  • docs/discussions/knowledge-base/23.mdx
  • docs/discussions/knowledge-base/230.mdx
  • docs/discussions/knowledge-base/231.mdx
  • docs/discussions/knowledge-base/232.mdx
  • docs/discussions/knowledge-base/233.mdx
  • docs/discussions/knowledge-base/234.mdx
  • docs/discussions/knowledge-base/235.mdx
  • docs/discussions/knowledge-base/237.mdx
  • docs/discussions/knowledge-base/238.mdx
  • docs/discussions/knowledge-base/239.mdx
  • docs/discussions/knowledge-base/24.mdx
  • docs/discussions/knowledge-base/240.mdx
  • docs/discussions/knowledge-base/242.mdx
  • docs/discussions/knowledge-base/243.mdx
  • docs/discussions/knowledge-base/244.mdx
  • docs/discussions/knowledge-base/25.mdx
  • docs/discussions/knowledge-base/250.mdx
  • docs/discussions/knowledge-base/253.mdx
  • docs/discussions/knowledge-base/255.mdx
  • docs/discussions/knowledge-base/256.mdx
  • docs/discussions/knowledge-base/257.mdx
  • docs/discussions/knowledge-base/258.mdx
  • docs/discussions/knowledge-base/259.mdx
  • docs/discussions/knowledge-base/26.mdx
  • docs/discussions/knowledge-base/260.mdx
  • docs/discussions/knowledge-base/261.mdx
  • docs/discussions/knowledge-base/263.mdx
  • docs/discussions/knowledge-base/264.mdx
  • docs/discussions/knowledge-base/265.mdx
  • docs/discussions/knowledge-base/27.mdx
  • docs/discussions/knowledge-base/28.mdx
  • docs/discussions/knowledge-base/282.mdx
  • docs/discussions/knowledge-base/283.mdx
  • docs/discussions/knowledge-base/284.mdx
  • docs/discussions/knowledge-base/286.mdx
  • docs/discussions/knowledge-base/287.mdx
  • docs/discussions/knowledge-base/289.mdx
  • docs/discussions/knowledge-base/29.mdx
  • docs/discussions/knowledge-base/298.mdx
  • docs/discussions/knowledge-base/299.mdx
  • docs/discussions/knowledge-base/3.mdx
  • docs/discussions/knowledge-base/302.mdx
  • docs/discussions/knowledge-base/303.mdx
  • docs/discussions/knowledge-base/304.mdx
  • docs/discussions/knowledge-base/305.mdx
  • docs/discussions/knowledge-base/306.mdx
  • docs/discussions/knowledge-base/307.mdx
  • docs/discussions/knowledge-base/31.mdx
  • docs/discussions/knowledge-base/312.mdx
  • docs/discussions/knowledge-base/313.mdx
  • docs/discussions/knowledge-base/314.mdx
  • docs/discussions/knowledge-base/315.mdx
  • docs/discussions/knowledge-base/316.mdx
  • docs/discussions/knowledge-base/318.mdx
  • docs/discussions/knowledge-base/319.mdx
  • docs/discussions/knowledge-base/320.mdx
  • docs/discussions/knowledge-base/321.mdx
  • docs/discussions/knowledge-base/322.mdx
  • docs/discussions/knowledge-base/323.mdx
  • docs/discussions/knowledge-base/325.mdx
  • docs/discussions/knowledge-base/326.mdx
  • docs/discussions/knowledge-base/328.mdx
  • docs/discussions/knowledge-base/329.mdx
  • docs/discussions/knowledge-base/330.mdx
  • docs/discussions/knowledge-base/331.mdx
  • docs/discussions/knowledge-base/332.mdx
  • docs/discussions/knowledge-base/333.mdx
  • docs/discussions/knowledge-base/334.mdx
  • docs/discussions/knowledge-base/335.mdx
  • docs/discussions/knowledge-base/336.mdx
  • docs/discussions/knowledge-base/337.mdx
  • docs/discussions/knowledge-base/338.mdx
  • docs/discussions/knowledge-base/339.mdx
  • docs/discussions/knowledge-base/34.mdx
  • docs/discussions/knowledge-base/340.mdx
  • docs/discussions/knowledge-base/341.mdx
  • docs/discussions/knowledge-base/343.mdx
  • docs/discussions/knowledge-base/344.mdx
  • docs/discussions/knowledge-base/345.mdx
  • docs/discussions/knowledge-base/347.mdx
  • docs/discussions/knowledge-base/348.mdx
  • docs/discussions/knowledge-base/349.mdx
  • docs/discussions/knowledge-base/35.mdx
  • docs/discussions/knowledge-base/350.mdx
  • docs/discussions/knowledge-base/351.mdx
  • docs/discussions/knowledge-base/352.mdx
  • docs/discussions/knowledge-base/353.mdx
  • docs/discussions/knowledge-base/355.mdx
  • docs/discussions/knowledge-base/356.mdx
  • docs/discussions/knowledge-base/357.mdx
  • docs/discussions/knowledge-base/358.mdx
  • docs/discussions/knowledge-base/359.mdx
  • docs/discussions/knowledge-base/36.mdx
  • docs/discussions/knowledge-base/360.mdx
  • docs/discussions/knowledge-base/366.mdx
  • docs/discussions/knowledge-base/37.mdx
  • docs/discussions/knowledge-base/38.mdx
  • docs/discussions/knowledge-base/388.mdx
  • docs/discussions/knowledge-base/389.mdx
  • docs/discussions/knowledge-base/39.mdx
  • docs/discussions/knowledge-base/390.mdx
  • docs/discussions/knowledge-base/391.mdx
  • docs/discussions/knowledge-base/392.mdx
  • docs/discussions/knowledge-base/393.mdx
  • docs/discussions/knowledge-base/394.mdx
  • docs/discussions/knowledge-base/395.mdx
  • docs/discussions/knowledge-base/396.mdx
  • docs/discussions/knowledge-base/397.mdx
  • docs/discussions/knowledge-base/398.mdx
  • docs/discussions/knowledge-base/399.mdx
  • docs/discussions/knowledge-base/40.mdx
  • docs/discussions/knowledge-base/400.mdx
  • docs/discussions/knowledge-base/401.mdx
  • docs/discussions/knowledge-base/402.mdx
  • docs/discussions/knowledge-base/403.mdx
  • docs/discussions/knowledge-base/406.mdx
  • docs/discussions/knowledge-base/407.mdx
  • docs/discussions/knowledge-base/408.mdx
  • docs/discussions/knowledge-base/409.mdx
  • docs/discussions/knowledge-base/41.mdx
  • docs/discussions/knowledge-base/410.mdx
  • docs/discussions/knowledge-base/411.mdx
  • docs/discussions/knowledge-base/412.mdx
  • docs/discussions/knowledge-base/413.mdx
  • docs/discussions/knowledge-base/414.mdx
  • docs/discussions/knowledge-base/416.mdx
  • docs/discussions/knowledge-base/418.mdx
  • docs/discussions/knowledge-base/419.mdx
  • docs/discussions/knowledge-base/42.mdx
  • docs/discussions/knowledge-base/423.mdx
  • docs/discussions/knowledge-base/424.mdx
  • docs/discussions/knowledge-base/425.mdx
  • docs/discussions/knowledge-base/426.mdx
  • docs/discussions/knowledge-base/427.mdx
  • docs/discussions/knowledge-base/428.mdx
  • docs/discussions/knowledge-base/429.mdx
  • docs/discussions/knowledge-base/43.mdx
  • docs/discussions/knowledge-base/430.mdx
  • docs/discussions/knowledge-base/431.mdx
  • docs/discussions/knowledge-base/432.mdx
  • docs/discussions/knowledge-base/434.mdx
  • docs/discussions/knowledge-base/435.mdx
  • docs/discussions/knowledge-base/436.mdx
  • docs/discussions/knowledge-base/437.mdx
  • docs/discussions/knowledge-base/438.mdx
  • docs/discussions/knowledge-base/439.mdx
  • docs/discussions/knowledge-base/440.mdx
  • docs/discussions/knowledge-base/441.mdx
  • docs/discussions/knowledge-base/442.mdx
  • docs/discussions/knowledge-base/443.mdx
  • docs/discussions/knowledge-base/444.mdx
  • docs/discussions/knowledge-base/445.mdx
  • docs/discussions/knowledge-base/446.mdx
  • docs/discussions/knowledge-base/447.mdx
  • docs/discussions/knowledge-base/448.mdx
  • docs/discussions/knowledge-base/449.mdx
  • docs/discussions/knowledge-base/45.mdx
  • docs/discussions/knowledge-base/450.mdx
  • docs/discussions/knowledge-base/451.mdx
  • docs/discussions/knowledge-base/452.mdx
  • docs/discussions/knowledge-base/453.mdx
  • docs/discussions/knowledge-base/454.mdx
  • docs/discussions/knowledge-base/463.mdx
  • docs/discussions/knowledge-base/464.mdx
  • docs/discussions/knowledge-base/465.mdx
  • docs/discussions/knowledge-base/467.mdx
  • docs/discussions/knowledge-base/468.mdx
  • docs/discussions/knowledge-base/469.mdx
  • docs/discussions/knowledge-base/47.mdx
  • docs/discussions/knowledge-base/470.mdx

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docusaurus-3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant