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