withastro/astro
Content and build integrations
Integrations that don't fit the framework-renderer or server-adapter shape. They typically inject Vite plugins or generate output during astro:build:done.
@astrojs/mdx (packages/integrations/mdx/)
Adds .mdx route support. Wraps @mdx-js/mdx and reuses @astrojs/markdown-remark for the markdown half. Supports component imports inside MDX, layout frontmatter, and the same Shiki/Smartypants/heading config as plain markdown.
@astrojs/markdoc (packages/integrations/markdoc/)
Adds .mdoc (Markdoc) support. Generates types via astro sync for the project's tags and nodes. Markdoc is a more constrained markdown alternative used for editorial workflows that need a strict component vocabulary.
@astrojs/sitemap (packages/integrations/sitemap/)
Walks the route manifest produced at astro:build:done and emits sitemap-index.xml plus per-locale sitemap files. Also handles fallbackRoutes from astro:routes:resolved (feat: Add fallbackRoutes to astro:routes:resolved's return type and include them in the sitemap integration, commit babf57f).
Configuration (SitemapOptions) covers filters, custom lastmod/priority/changefreq per page, i18n root maps, and a serialize callback.
@astrojs/partytown (packages/integrations/partytown/)
Embeds Partytown so that third-party scripts (analytics, ad networks, …) can run on a web worker and skip the main thread. The integration injects the Partytown bootstrap script and configuration into every page.
@astrojs/web-vitals (packages/integrations/web-vitals/)
Captures real-user web vitals (LCP, FID, CLS, INP) via the web-vitals library and stores them in @astrojs/db. The integration adds a client:load script to every page and a database table to receive the metrics. It is one of the few non-trivial consumers of @astrojs/db inside the monorepo.
@astrojs/tailwind (packages/integrations/tailwind/)
Now a stub README. Tailwind v4 has first-class Vite support, so Astro recommends using it directly via astro.config.mjs's vite.plugins. The integration is kept around to issue a clear deprecation message rather than break installs.
How content/build integrations interact with the build
graph TD
A[astro.config.mjs<br/>integrations: [...]]
A -->|astro:config:setup| B[Register Vite plugins]
B --> C[Vite build]
C --> D[astro:build:start hook]
D --> E[Vite SSR build]
E --> F[BuildPipeline renders pages]
F --> G[astro:build:done hook]
G --> H[Sitemap, route manifest, redirects, etc.]@astrojs/sitemap and @astrojs/web-vitals are the canonical examples of astro:build:done consumers; @astrojs/mdx and @astrojs/markdoc are the canonical examples of astro:config:setup adding Vite plugins.
Related pages
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.