npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

starlight-theme-mdbook

v0.1.5

Published

Starlight theme that looks and feels like rust-lang's mdBook — layout, chrome, and 4 built-in color schemes plus 2 bonus daisyUI-ported themes.

Readme

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 (content collections, Markdown/MDX, Pagefind search, i18n, sidebar autogeneration, etc.) untouched underneath.

Install

npm install starlight-theme-mdbook

Usage

Add the plugin to your 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 theme wires up its component overrides and CSS automatically.

What's included

  • Color schemes — Light, Dark (mdBook's Coal), Rust, plus two bonus palettes ported from daisyUI (Valentine, Caramellatte) — selectable from an icon-only paintbrush button in the navbar, matching mdBook's own theme popup.
  • Layout — a genuine full-height left sidebar, a navbar confined to the content column with mdBook's exact button layout (hamburger · theme · search — left; print · git repo · edit — right), and a draggable resize handle on the sidebar's edge.
  • "On this page" — heading TOC injected directly into the left sidebar under the active chapter link, instead of Starlight's default right sidebar (mdBook doesn't have a separate TOC column).
  • Chapter navigation — floating / arrow buttons pinned to the viewport edges (collapsing to inline buttons on narrow screens), with real Left/Right arrow-key navigation ported from mdBook's book.js.
  • Mobile — the sidebar is a true collapsible overlay at any screen width, auto-closes when you tap a real navigating link, and the navbar's icon clusters shrink to fit narrow screens.

This theme does not ship custom webfonts (mdBook uses Open Sans/Source Code Pro) — an npm package can't easily place font files into a consumer's public/ directory, so it uses Starlight's default system-font stack instead.

Configuring your docs

Same as any Starlight site — title, social, editLink, sidebar, etc. all work normally alongside the plugin. One recommendation: list your index page explicitly in sidebar (e.g. { label: 'Introduction', slug: 'index' }) so it participates in prev/next chapter navigation instead of being an orphaned homepage, matching how mdBook treats its own index.md.

Credits

This theme's layout, chrome, and color schemes are visually ported from rust-lang/mdBook (MPL-2.0) — all code here is freshly written for Astro/Starlight, not a fork, but the design and several behaviors (drag-to-resize, arrow-key chapter navigation) are directly adapted from mdBook's own front-end. Full credit to the mdBook maintainers and contributors.

The Valentine and Caramellatte color themes are ported from daisyUI by Pouya Saadeghi. Thanks!

License

MIT