Beyond UI frameworks and deployment adapters, Astro offers many other integrations to enhance your site with additional features and tools.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/withastro/docs/llms.txt
Use this file to discover all available pages before exploring further.
Popular Integrations
MDX
Use JSX components and expressions in Markdown files
Sitemap
Automatically generate XML sitemaps for SEO
Partytown
Run third-party scripts in a web worker
Tailwind CSS
Utility-first CSS framework integration
MDX Integration
The@astrojs/mdx integration enables the usage of MDX components and allows you to create pages as .mdx files.
What is MDX?
MDX allows you to use variables, JSX expressions, and components within Markdown content. You can write standard Markdown and seamlessly include interactive components.Installation
- Automatic
- Manual
Usage Example
Create an.mdx file with frontmatter and components:
src/pages/post.mdx
Using Components in MDX
Import and use both Astro and framework components:src/content/blog/post-1.mdx
Custom Component Mapping
Map Markdown syntax to custom components:src/components/Blockquote.astro
src/pages/post.mdx
Configuration
Configure MDX with remark and rehype plugins:astro.config.mjs
Sitemap Integration
The@astrojs/sitemap integration automatically generates an XML sitemap for your site to help search engines discover your pages.
Installation
- Automatic
- Manual
The
site option is required for sitemap generation.Configuration
Customize your sitemap generation:astro.config.mjs
Partytown Integration
The@astrojs/partytown integration moves third-party scripts into a web worker, keeping your main thread free for a better user experience.
Installation
- Automatic
- Manual
Usage
Add thetype="text/partytown" attribute to your scripts:
src/pages/index.astro
Tailwind CSS Integration
The@astrojs/tailwind integration brings Tailwind CSS’s utility-first CSS framework to your project.
Installation
- Automatic
- Manual
Configuration
Customize Tailwind with a config file:tailwind.config.mjs
Usage
Use Tailwind utility classes in your components:src/components/Button.astro
Database Integrations
Connect to databases with official integrations:@astrojs/db- Astro’s built-in SQL database- Community integrations for PostgreSQL, MongoDB, and more
Image Optimization
@astrojs/image- Optimize and transform images- Works with local and remote images
- Automatic format conversion and resizing
Finding More Integrations
Browse the complete set of hundreds of official and community integrations:- Astro Integrations Directory
- Filter by category: authentication, analytics, performance, SEO, accessibility, and more
- Community-built integrations for popular services and tools