// @ts-check import { defineConfig } from 'astro/config'; import starlight from '@astrojs/starlight'; const DEV_DOMAIN = process.env.DEV_DOMAIN ?? 'informix-driver.l.warehack.ing'; // https://astro.build/config export default defineConfig({ site: 'https://informix-driver.warehack.ing', server: { host: '0.0.0.0', port: 4321 }, telemetry: false, devToolbar: { enabled: false }, vite: { server: { host: '0.0.0.0', hmr: { host: DEV_DOMAIN, protocol: 'wss', clientPort: 443, }, allowedHosts: [DEV_DOMAIN, '.warehack.ing', 'localhost', '127.0.0.1'], }, }, integrations: [ starlight({ title: 'informix-db', description: 'Pure-Python driver for IBM Informix IDS. No CSDK, no JVM, no native libraries.', logo: { src: './src/assets/logo.svg', replacesTitle: false }, favicon: '/favicon.svg', tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 4 }, lastUpdated: true, pagination: true, editLink: { baseUrl: 'https://github.com/rsp2k/informix-db/edit/main/docs-site/', }, social: [ { icon: 'github', label: 'GitHub', href: 'https://github.com/rsp2k/informix-db' }, { icon: 'seti:python', label: 'PyPI', href: 'https://pypi.org/project/informix-db/' }, ], customCss: ['./src/styles/theme.css', './src/styles/components.css'], components: { Hero: './src/components/Hero.astro', Footer: './src/components/Footer.astro', }, expressiveCode: { themes: ['github-dark', 'github-light'], styleOverrides: { borderRadius: '6px', codeFontFamily: "'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace", }, }, head: [ { tag: 'link', attrs: { rel: 'preconnect', href: 'https://rsms.me' }, }, { tag: 'link', attrs: { rel: 'stylesheet', href: 'https://rsms.me/inter/inter.css', }, }, { tag: 'meta', attrs: { name: 'theme-color', content: '#0e0d0c' }, }, { tag: 'meta', attrs: { property: 'og:type', content: 'website' }, }, ], sidebar: [ { label: 'Start here', items: [ { label: 'WTF did you build this for?', slug: 'start/wtf' }, { label: 'Install & first query', slug: 'start/quickstart' }, { label: 'Compared to IfxPy', slug: 'start/vs-ifxpy' }, ], }, { label: 'How-to guides', items: [ { label: 'Connect with TLS', slug: 'how-to/tls' }, { label: 'Use the connection pool', slug: 'how-to/pool' }, { label: 'Async with FastAPI', slug: 'how-to/async-fastapi' }, { label: 'Bulk inserts (executemany)', slug: 'how-to/executemany' }, { label: 'Optimize bulk SELECT', slug: 'how-to/buffered-reader' }, { label: 'BLOB / CLOB read & write', slug: 'how-to/smart-lobs' }, { label: 'Migrate from IfxPy', slug: 'how-to/migrate-from-ifxpy' }, { label: 'Run the dev container', slug: 'how-to/dev-container' }, ], }, { label: 'Reference', items: [ { label: 'API surface', slug: 'reference/api' }, { label: 'SQL ↔ Python types', slug: 'reference/types' }, { label: 'Configuration & env flags', slug: 'reference/config' }, { label: 'Exceptions & error codes', slug: 'reference/exceptions' }, { label: 'Performance baselines', slug: 'reference/benchmarks' }, ], }, { label: 'Explanation', items: [ { label: 'The SQLI wire protocol', slug: 'explain/sqli-protocol' }, { label: 'Architecture overview', slug: 'explain/architecture' }, { label: 'The buffered reader (Phase 39)', slug: 'explain/buffered-reader' }, { label: 'Async strategy', slug: 'explain/async-strategy' }, { label: 'Pure-Python tradeoffs', slug: 'explain/pure-python' }, { label: 'The phase log', slug: 'explain/phase-log' }, ], }, ], }), ], });