build(docs): render Markdown with Sätteri and drop the remark plugin - #1784
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe documentation site replaces the local heading ID plugin with Sätteri's ChangesMarkdown processor migration
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to The migration preserves documented heading anchors and introduces no merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. A rabbit hops through markdown bright Comment |
Deploying quickadd with
|
| Latest commit: |
772699d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://203bc368.quickadd.pages.dev |
| Branch Preview URL: | https://build-docs-satteri.quickadd.pages.dev |
Summary
Astro 7's default Markdown processor, Sätteri, supports custom heading ids (
## Heading {#custom-id}) natively through itsheadingAttributesfeature. That's the only thing our custom remark plugin did. So this PR switches the docs site to Sätteri and deletes the plugin and the whole remark stack it needed. The site renders the same.Changes
astro.config.mjs:markdown.processor: satteri({ features: { headingAttributes: true } }).plugins/remark-heading-id.mjs, including its workaround for smartypants turning--in ids into dashes. Sätteri reads heading attributes before smart punctuation runs, so ids likeai--onlinecome through as written.@astrojs/markdown-remarkandunist-util-visitare replaced by@astrojs/markdown-satteri(already in the tree via Astro and Starlight).@mdx-js/mdx, estree/recma/retext,rehype-raw,remark-smartypants, …) and an unused optionaltypescriptpeer.@astrojs/starlight0.42.0 → 0.42.3 (a desktop sidebar popover fix and a TOC freeze fix forPageTitleoverrides), plus small transitive patches (verkit,undici,devalue, …).zodnote now names the importer that makes the pin necessary.The
zodpin stays. I tested removing it by putting a booby-trappedzodin the parentnode_modules, and the build loaded it: Astro's prerender bundle importszod/v4from the project root.Testing / validation
Clean
node_modules, Node 22.23.2,pnpm install --frozen-lockfile && pnpm run build, compared against masterce44a43b:i18nand404warnings).scripts/check-links.py: 0 problems. All 313{#id}markers render as ids, with none left in the text.data-pagefind-ignoreinstead of="", a raw<br />instead of<br>, and whitespace between block tags.popoverattribute (the 0.42.1 fix). No JS errors.llms.txt,llms-small.txt,llms-full.txt, every.mdendpoint,docs-index.json, sitemap,_redirectsand_headers: byte-identical.astro dev: anchors and asides render.pnpm dedupe --checkis clean.Checklist
build(docs)does not trigger a release.Note
Switch docs Markdown renderer to Sätteri and remove
remark-heading-idplugin@astrojs/markdown-remarkfor@astrojs/markdown-satteriand drops the directunist-util-visitdependency in package.json, with matching lockfile updates.Macroscope summarized 772699d.
Summary by CodeRabbit
Documentation
## Heading {#custom-id}, continue to work.Refactor