import { defineConfig } from 'astro/config'; import starlight from '@astrojs/starlight'; import mermaid from 'astro-mermaid'; export default defineConfig({ site: 'https://openocd-python.warehack.ing', telemetry: false, devToolbar: { enabled: false }, integrations: [ mermaid({ autoTheme: true }), starlight({ title: 'openocd-python', description: 'Typed async-first Python bindings for OpenOCD', logo: { src: './src/assets/logo.svg', alt: 'openocd-python', }, favicon: '/favicon.svg', social: [ { icon: 'github', label: 'GitHub', href: 'https://git.supported.systems/warehack.ing/openocd-python', }, ], customCss: ['./src/styles/custom.css'], sidebar: [ { label: 'Getting Started', items: [ { label: 'Installation', slug: 'getting-started/installation' }, { label: 'First Connection', slug: 'getting-started/first-connection' }, { label: 'CLI Reference', slug: 'getting-started/cli' }, { label: 'Quick Start', slug: 'getting-started/quick-start' }, ], }, { label: 'Guides', items: [ { label: 'Session Lifecycle', slug: 'guides/session-lifecycle' }, { label: 'Async vs Sync', slug: 'guides/async-vs-sync' }, { label: 'Error Handling', slug: 'guides/error-handling' }, { label: 'Target Control', slug: 'guides/target-control' }, { label: 'Memory Operations', slug: 'guides/memory-operations' }, { label: 'Register Access', slug: 'guides/register-access' }, { label: 'Flash Programming', slug: 'guides/flash-programming' }, { label: 'Breakpoints & Watchpoints', slug: 'guides/breakpoints' }, { label: 'JTAG Operations', slug: 'guides/jtag-operations' }, { label: 'SWD Operations', slug: 'guides/swd-operations' }, { label: 'SVD Register Decoding', slug: 'guides/svd-decoding' }, { label: 'RTT Communication', slug: 'guides/rtt-communication' }, { label: 'Transport & Adapter', slug: 'guides/transport-adapter' }, { label: 'Event Callbacks', slug: 'guides/event-callbacks' }, ], }, { label: 'API Reference', items: [ { label: 'Session API', slug: 'reference/session-api' }, { label: 'Types', slug: 'reference/types' }, { label: 'Exceptions', slug: 'reference/exceptions' }, { label: 'Connection Layer', slug: 'reference/connection-layer' }, { label: 'Method Index', slug: 'reference/method-index' }, ], }, { label: 'Examples', items: [ { label: 'Debug Session', slug: 'examples/debug-session' }, { label: 'Flash Programming', slug: 'examples/flash-programming' }, { label: 'SVD Inspection', slug: 'examples/svd-inspection' }, ], }, ], }), ], vite: { server: { host: '0.0.0.0', ...(process.env.VITE_HMR_HOST && { hmr: { host: process.env.VITE_HMR_HOST, protocol: 'wss', clientPort: 443, }, }), }, }, });