Skip to content

gruntlord5/star-lite-docs

Repository files navigation

Star-Lite Docs

The Starlight documentation experience, powered by EmDash CMS. Edit docs visually in the browser - no MDX files, no Git commits, no rebuilds.

Get Started

Deploy to Cloudflare Workers

Install Bun if you don't have it:

curl -fsSL https://bun.sh/install | bash

Then create your project:

bun create star-lite-docs

The CLI scaffolds your project and offers three deployment targets: Local, Docker, or Cloudflare Workers (with automatic D1/R2 provisioning and deploy).

Tip

Star-Lite also works with any existing emdash site - just run bunx astro add star-lite-docs. Block components, the welcome page, and route conflict warnings are all handled automatically at build time.

Why Star-Lite?

Starlight is great for developers. But non-technical contributors can't edit MDX files, and every change requires a commit + rebuild. Star-Lite gives you the same Starlight layout and components, backed by a CMS with visual editing - click text on the page, edit it, hit Save.

Visual Editing

Toggle Edit in the toolbar, click any text, and edit in place. A Save button appears - click it and your changes are live.

Block Editor

Hover any block to reveal an Edit button. Opens an inline property editor for all fields - no admin panel needed.

Markdown Mode

Click "Edit as MD" to switch to a full-page markdown textarea. All blocks round-trip as markdown. Same workflow as Starlight.

Features

  • Starlight layout - collapsible sidebar, table of contents, Ctrl+K search, dark/light/auto theme
  • 14 block types - hero, tabs, cards, asides, steps, badges, file trees, icons, link buttons, code, images, and raw HTML
  • Zero config - one integration, no schema setup. First request seeds the pages collection, sidebar menu, and welcome page
  • Menu-driven sidebar - edit navigation from the admin UI, no rebuild needed
  • Expressive Code - syntax highlighting with bundled Night Owl themes
  • Copy Page MD - one-click clipboard export of any page as markdown

Deploy

Cloudflare Workers

Use the one click deploy button Deploy to Cloudflare Workers

Or let the CLI handles everything - D1, R2, deploy, admin user creation, and seed content:

bun create star-lite-docs   # choose Cloudflare Workers → Start now

Docker

bun create star-lite-docs   # choose Docker → Start now

Or manually:

docker build -t <project-name> .
docker run -d --restart unless-stopped -p 4321:4321 \
  -v <project-name>-data:/app/data \
  -v <project-name>-uploads:/app/uploads \
  <project-name>

Node.js

bun create star-lite-docs   # choose Local development → Start now

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 */ },
});

Block Types

Block Description
docs.hero Splash hero with title, tagline, image, and action buttons
docs.image Standalone image with editable src and alt
docs.html Raw HTML passthrough (also used for preprocessed text blocks)
code Expressive Code syntax-highlighted block
star-lite.tabs Tabbed content panels
star-lite.card Content card with optional icon and color
star-lite.cardGrid Grid layout for cards
star-lite.linkCard Navigation card with title, description, and link
star-lite.aside Callout box - note, tip, caution, or danger
star-lite.badge Inline status badge
star-lite.fileTree File and directory tree
star-lite.icon Inline icon from the Starlight icon set
star-lite.linkButton Styled link rendered as a pill button
star-lite.steps Numbered step-by-step instructions

Add to an Existing EmDash Site

bunx astro add star-lite-docs

This wires starLiteDocs() into your astro.config.mjs. If installing from GitHub instead of npm:

bun add github:gruntlord5/star-lite-docs

Then add the integration manually:

import { starLiteDocs } from "star-lite-docs";

// 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.

API

import {
  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";

import type {
  StarLiteDocsOptions,
  StarLiteDocsConfig,
  SidebarConfig,
  SidebarEntry,
  SidebarLink,
  SidebarGroup,
} from "star-lite-docs";

Astro components are available at subpath imports:

import DocsLayout from "star-lite-docs/layout";

License

MIT License

Copyright (c) 2026 Star-Lite Docs contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

The Starlight documentation experience, powered by EmDash CMS. Edit docs visually in the browser.

Resources

License

Stars

Watchers

Forks

Contributors