@theholocron/astro-config
v7.19.1
Published
Astro configuration factory for theholocron docs sites.
Maintainers
Readme
Astro Config
An Astro configuration factory for theholocron docs sites.
Installation
pnpm add -D @theholocron/astro-configUsage
Pass starlight and docsTheme from your own imports alongside the docs config. This keeps Astro's module loader in control of those framework imports:
// astro.config.ts
import starlight from "@astrojs/starlight";
import { docsTheme } from "@theholocron/docs-theme";
import { defineConfig } from "@theholocron/astro-config";
import clientsConfig from "@theholocron/clients-docs";
export default defineConfig({
docs: clientsConfig,
importMetaUrl: import.meta.url,
starlight,
docsTheme,
});Custom sidebar label
By default the sidebar group label is derived from docs.sidebar[1].label. Override it when the label differs:
import starlight from "@astrojs/starlight";
import { docsTheme } from "@theholocron/docs-theme";
import { defineConfig } from "@theholocron/astro-config";
import holocronConfig from "@theholocron/holocron-docs";
export default defineConfig({
docs: holocronConfig,
importMetaUrl: import.meta.url,
starlight,
docsTheme,
sidebarLabel: "Reference",
});What it generates
site—https://theholocron.github.iobase—/${docs.slug}- Starlight integration with the
@theholocron/docs-themeplugin - GitHub social link to
https://github.com/theholocron/${docs.slug} - Sidebar with an Overview link and an autogenerated sub-pages group
