Add to an Existing Site
Install
bunx astro add star-lite-docsThis wires starLiteDocs() into your astro.config.mjs. If installing from GitHub instead of npm:
bun add github:gruntlord5/star-lite-docsThen add the integration manually:
// add to your integrations array:starLiteDocs({ title: "My Docs" }),Block components, the welcome page, and route conflict warnings are all handled automatically at build time.
Configuration
starLiteDocs({ title: "My Docs",
// Omit for menu-driven sidebar (editable from admin UI) sidebar: [ { label: "Guide", items: [ { label: "Getting Started", link: "/getting-started" }, { label: "Installation", link: "/install" }, ], }, ],
// Set to `false` to disable bundled Expressive Code expressiveCode: { /* AstroExpressiveCodeOptions */ },});API
starLiteDocs, // Astro integration (blocks auto-registered at build) starLiteBlocks, // emdash plugin descriptor (only needed for advanced setups) preprocessBlocks, // PT normalizer (headings, tables, images, text → docs.html) preprocessImages, // image-only subset loadSidebarFromMenu, // resolve emdash menu → SidebarConfig[] ensurePagesCollection, // idempotent seed bootstrap defaultSeed, // the SeedFile shipped by the plugin buildSidebar, // build sidebar tree from flat config markCurrent, // mark the active sidebar item by slug} from "star-lite-docs";
StarLiteDocsOptions, StarLiteDocsConfig, SidebarConfig, SidebarEntry, SidebarLink, SidebarGroup,} from "star-lite-docs";Astro components are available at subpath imports: