spicebook/docs-site/astro.config.mjs
Ryan Malloy ad7e80c722 Add Starlight docs site with API reference, guides, and embedding docs
Starlight site at docs-site/ following warehack.ing cookie-cutter pattern
(3-compose split, Caddy prod stage, Makefile targets). 15 content pages
covering simulation engines, waveform viewer, schematics, embedding with
postMessage theme sync, and full REST API reference adapted from llms.txt.
Blue accent theme matching SpiceBook's application palette. Adds docs link
to homepage reference section.
2026-03-06 11:55:21 -07:00

80 lines
2.4 KiB
JavaScript

import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
site: 'https://spicebook-docs.warehack.ing',
telemetry: false,
devToolbar: { enabled: false },
integrations: [
starlight({
title: 'SpiceBook',
tagline: 'Circuit simulation notebooks',
social: [
{ icon: 'external', label: 'SpiceBook', href: 'https://spicebook.warehack.ing' },
{ icon: 'external', label: 'mcltspice', href: 'https://mcltspice.warehack.ing' },
],
customCss: ['./src/styles/custom.css'],
expressiveCode: {
themes: ['dracula', 'github-light'],
},
sidebar: [
{
label: 'Getting Started',
items: [
{ label: 'What is SpiceBook?', slug: '' },
{ label: 'Quick Start', slug: 'getting-started/quick-start' },
{ label: 'Editor Basics', slug: 'getting-started/editor-basics' },
],
},
{
label: 'Simulation',
items: [
{ label: 'Engines', slug: 'simulation/engines' },
{ label: 'Running Simulations', slug: 'simulation/running' },
{ label: 'Waveform Viewer', slug: 'simulation/waveforms' },
],
},
{
label: 'Schematics',
items: [
{ label: 'Auto-Generated Diagrams', slug: 'schematics/auto-generated' },
{ label: 'Color-Coded Resistors', slug: 'schematics/resistor-colors' },
],
},
{
label: 'Embedding',
items: [
{ label: 'Embed a Notebook', slug: 'embedding/embed-notebook' },
{ label: 'Theme Sync', slug: 'embedding/theme-sync' },
],
},
{
label: 'API',
collapsed: false,
items: [
{ label: 'REST API Overview', slug: 'api/overview' },
{ label: 'Notebooks', slug: 'api/notebooks' },
{ label: 'Cells', slug: 'api/cells' },
{ label: 'Simulation', slug: 'api/simulation' },
{ label: 'Waveforms & Schematics', slug: 'api/waveforms-schematics' },
],
},
],
}),
],
vite: {
plugins: [tailwindcss()],
server: {
host: '0.0.0.0',
...(process.env.VITE_HMR_HOST && {
hmr: {
host: process.env.VITE_HMR_HOST,
protocol: 'wss',
clientPort: 443,
},
}),
},
},
});