Skip to content

feat: support Astro 7 - #17

Merged
nc9 merged 2 commits into
mainfrom
feat/astro-7
Aug 26, 2026
Merged

nc9 merged 2 commits into
mainfrom
feat/astro-7

Conversation

@nc9

@nc9 nc9 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Why

A project that pins Astro 7 itself (root overrides, a monorepo that hoists it, anything that outranks tangly's ^6) gets a docs site where every code block is an unstyled <pre>: no highlighting, no copy button, no annotation pairing. Astro 7 deprecated remarkPlugins / rehypePlugins on mdx({...}) and stopped running them. Nothing fails: build exits 0, tangly check --strict passes, every page is written. This is live on docs.squirrelscan.com right now.

What

  • Astro 7, @astrojs/mdx 7, Vite 8, plus current Cloudflare / Node / Vercel / Preact adapters.
  • The plugin pipeline moves to markdown.processor via unified() from @astrojs/markdown-remark, which MDX inherits. One pipeline for .md and .mdx, declared once.
  • @types/hast pinned. Astro 7 pulled a second copy; hast's nominal types then made hastscript's Child reject theme-ui's ElementContent. Note a stale node_modules survives the pin: a clean install is needed once.
  • Both tarball smokes now assert the output. The fixture project gets a fenced code block and the smoke fails unless a built page contains a highlighted tangly-code-figure.

Verification

  • bun run ci green: format, lint, build, typecheck, 141 + 20 tests.
  • Tangly's own docs: 0 code figures before, 52 after, and the deprecation warning is gone.
  • Both tarball smokes pass end to end.
  • The new guard was tested in both directions. With the pipeline put back on mdx(), the flat smoke fails with no highlighted code figure in 4 built page(s). Restored, it passes. It also caught a bug in its own first draft (asserting against index.html, when the fixture's fence renders at /introduction/), which is why it now scans every built page.

Notes

Vite 8 surfaces deprecation warnings from Astro's own dev-toolbar plugin (optimizeDeps.esbuildOptions, resolve.alias customResolver). They come from Astro, not from Tangly config, and are noise until Astro updates.

Release as 0.4.0 (minor); the changelog entry is in this PR and the release workflow gates on it.

nc9 added 2 commits August 25, 2026 10:56
Astro 7 deprecated `remarkPlugins`/`rehypePlugins` on `mdx({...})` and stopped
running them: the build still succeeds, every page is still written, and every
code block comes out as a bare <pre> with no highlighting, no copy button and
no annotation pairing. The plugin list moves to `markdown.processor` via
`unified()` from @astrojs/markdown-remark, which MDX inherits.

Both tarball smokes now assert the built HTML contains a highlighted code
figure, so a pipeline that silently stops running fails the release gate
instead of shipping unstyled docs.

@types/hast is pinned: astro 7 pulled a second copy, and hast's nominal types
made hastscript's Child reject theme-ui's ElementContent.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
tangly-docs 8f92b44 Aug 25 2026, 01:01 AM

@nc9
nc9 merged commit c2bf73f into main Aug 26, 2026
17 of 18 checks passed
@nc9
nc9 deleted the feat/astro-7 branch August 26, 2026 02:28
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