Skip to content

Astro Config

@theholocron/astro-config provides a defineConfig factory that wires up a standard Astro + Starlight configuration for per-repo docs sites, including base path, title, GitHub social link, sidebar, and the shared docsTheme plugin.

Terminal window
pnpm add -D @theholocron/astro-config @astrojs/starlight @theholocron/docs-theme
astro.config.ts
import starlight from "@astrojs/starlight";
import { defineConfig } from "@theholocron/astro-config";
import { docsTheme } from "@theholocron/docs-theme";
export default defineConfig({
docs: {
name: "My Package",
github: "my-repo",
sidebar: [
{ label: "Overview", slug: "" },
{
label: "Packages",
items: [{ label: "Something", slug: "something" }],
},
],
},
starlight,
docsTheme,
srcDir: "./docs/src",
outDir: "./docs/dist",
publicDir: "./docs/public",
});

The full API reference is generated from the package’s TSDoc comments.