Skip to content

About

A Starlight theme that looks and feels like rust-lang's mdBook

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

starlight-theme-mdbook

A Starlight theme that looks and feels like rust-lang's mdBook (live example, used for The Rust Programming Language book) — layout, chrome, and color schemes — while keeping all of Starlight's own functionality untouched underneath.

This is a pnpm workspace with two packages:

Path What it is
packages/starlight-theme-mdbook The installable npm package. Published as starlight-theme-mdbook.
docs A Starlight site that consumes the theme via the plugin — both the dev sandbox for this repo and the theme's own usage guide.

Quick start

npm install starlight-theme-mdbook
// 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()],
		}),
	],
});

See packages/starlight-theme-mdbook/README.md or the full usage guide for more.

Developing this repo

pnpm install
cd docs && pnpm dev

The docs site depends on the theme package via workspace:*, so changes to packages/starlight-theme-mdbook are picked up immediately.

Credits

This theme's layout, chrome, and mdBook-native color schemes are visually ported from rust-lang/mdBook (MPL-2.0). The Valentine and Caramellatte color themes are ported from daisyUI by Pouya Saadeghi.

Support

If this theme is useful to you, donations are welcome. PayPal/Stripe-based options aren't available where I'm based, so for now:

  • Binance Pay — username 2u841r, Pay ID 463419485

License

MIT

About

A Starlight theme that looks and feels like rust-lang's mdBook

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages