Skip to content

Installation

Terminal window
npm install starlight-theme-mdbook

Add starlightThemeMdbook() to your plugins array in astro.config.mjs:

astro.config.mjs
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightThemeMdbook from 'starlight-theme-mdbook';
export default defineConfig({
integrations: [
starlight({
title: 'My Docs',
plugins: [starlightThemeMdbook()],
}),
],
});

That’s it. The plugin registers its own component overrides and CSS automatically — there’s nothing else to wire up, and none of your existing Starlight config (sidebar, social, editLink, content collections, i18n, etc.) needs to change.

If you don’t have a Starlight project yet:

Terminal window
npm create astro@latest -- --template starlight
cd my-docs
npm install starlight-theme-mdbook

Then add the plugin to astro.config.mjs as shown above.