Skip to content

docs-theme

@theholocron/docs-theme provides a Starlight plugin and a reusable content loader for all @theholocron documentation sites.

Terminal window
pnpm add @theholocron/docs-theme
Export Description
@theholocron/docs-theme docsTheme() Starlight plugin
@theholocron/docs-theme/loader createDocsLoader() Astro content loader

A Starlight plugin that injects the shared stylesheet into every Starlight site.

import { docsTheme } from "@theholocron/docs-theme";
starlight({ plugins: [docsTheme()] });

An Astro content loader that reads Markdown/MDX files from local directories or installed npm content packages into a Starlight docs collection.

Each source is either a local directory path or an npm package name:

import { createDocsLoader } from "@theholocron/docs-theme/loader";
createDocsLoader([
{ dir: "/absolute/path/to/content", slug: "prefix" },
{ package: "@theholocron/clients-docs", slug: "clients" },
]);
Option Description
dir Absolute path to a directory containing .md / .mdx files
package npm package name — resolves to the content/ directory inside the installed package
slug Slug prefix prepended to every entry from this source

Files named index.md are stored under the directory’s slug with no trailing /index.

The plugin ships a CSS file that sets the @theholocron visual identity tokens. It is injected automatically via the plugin — no manual import needed.