Skip to content

Fix MDX page directory boundary detection - #17694

Open
NgoQuocViet2001 wants to merge 1 commit into
withastro:mainfrom
NgoQuocViet2001:fix-mdx-pages-boundary
Open

Fix MDX page directory boundary detection#17694
NgoQuocViet2001 wants to merge 1 commit into
withastro:mainfrom
NgoQuocViet2001:fix-mdx-pages-boundary

Conversation

@NgoQuocViet2001

Copy link
Copy Markdown
Contributor

Changes

  • Require a directory boundary when deciding whether an MDX file is under src/pages.
  • Prevent sibling directories such as src/pages-old and src/pages2 from receiving page-only automatic charset injection in both the unified and Sätteri processors.

Testing

  • Added focused coverage for real pages and similarly prefixed sibling directories across both processor paths.
  • Ran: pnpm -C packages/integrations/mdx test
  • Ran: pnpm -C packages/integrations/mdx build
  • Ran: pnpm lint:ai

Docs

No docs changes. This corrects internal page classification without changing the public API.

@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f63144a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 47 packages
Name Type
@astrojs/mdx Patch
@test/astro-cloudflare Patch
@e2e/content-collections Patch
@e2e/csp-server-islands Patch
@e2e/preact-component Patch
@e2e/preact-lazy-component Patch
@e2e/react-component Patch
@e2e/server-islands Patch
@e2e/solid-component Patch
@e2e/svelte-component Patch
@e2e/vue-component Patch
@performance/mdx Patch
@test/astro-assets-prefix Patch
@test/astro-basic Patch
@test/content-with-spaces-in-folder-name Patch
@test/content-collections-base Patch
@test/content-collections-mutation Patch
@test/content-collections Patch
@test/content-intellisense Patch
@test/content-layer-remark-plugins Patch
@test/content-layer Patch
@test/content-ssr-integration Patch
@test/content-static-paths-integration Patch
@test/content Patch
@test/core-image-deletion Patch
@test/core-image-svg Patch
@test/incremental-build-content Patch
@test/incremental-build Patch
@test/jsx-queue-rendering Patch
@test/lightningcss-css-modules-content Patch
@test/partials Patch
@test/server-islands-ssr Patch
@test/slots-preact Patch
@test/slots-react Patch
@test/slots-solid Patch
@test/slots-svelte Patch
@test/slots-vue Patch
@test/special-chars-in-component-imports Patch
@test/tailwindcss Patch
@test/astro-cloudflare-prerender-styles Patch
@test/astro-cloudflare-vite-plugin Patch
@test/content-layer-rendering Patch
@test/mdx-css-head-mdx Patch
@test/image-remark-imgattr Patch
@test/mdx-astro-container-escape Patch
@test/mdx-frontmatter-injection Patch
astro-benchmark Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the pkg: integration Related to any renderer integration (scope) label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant