import { defineConfig } from "astro/config"; import starlight from "@astrojs/starlight"; import tailwindcss from "@tailwindcss/vite"; import remarkMath from "remark-math"; import rehypeKatex from "rehype-katex"; import mermaid from "astro-mermaid"; import icon from "astro-icon"; import opengraphImages from "astro-opengraph-images"; import { pgOrbitOgImage } from "./src/og-renderer.js"; import * as fs from "fs"; export default defineConfig({ site: "https://pg-orbit.warehack.ing", integrations: [ icon(), mermaid(), starlight({ title: "pg_orbit", description: "It's not rocket science. Celestial mechanics for PostgreSQL.", favicon: "/favicon.svg", logo: { src: "./src/assets/pg-orbit-logo.svg", replacesTitle: true, }, social: [ { icon: "github", label: "Gitea", href: "https://git.supported.systems/warehack.ing/pg_orbit", }, ], customCss: [ "./src/styles/custom.css", "./src/styles/katex-fixes.css", "katex/dist/katex.min.css", ], head: [ { tag: "meta", attrs: { name: "theme-color", content: "#0a0e17", }, }, ], components: { Head: "./src/components/Head.astro", }, sidebar: [ { label: "Getting Started", items: [ { label: "What is pg_orbit?", slug: "getting-started/what-is-pg-orbit" }, { label: "Installation", slug: "getting-started/installation" }, { label: "Quick Start", slug: "getting-started/quick-start" }, ], }, { label: "Guides", items: [ { label: "Tracking Satellites", slug: "guides/tracking-satellites" }, { label: "Observing the Solar System", slug: "guides/observing-solar-system" }, { label: "Planetary Moon Tracking", slug: "guides/planetary-moons" }, { label: "Star Catalogs in SQL", slug: "guides/star-catalogs" }, { label: "Comet & Asteroid Tracking", slug: "guides/comets-asteroids" }, { label: "Jupiter Radio Burst Prediction", slug: "guides/jupiter-radio-bursts" }, { label: "Interplanetary Trajectories", slug: "guides/interplanetary-trajectories" }, { label: "Conjunction Screening", slug: "guides/conjunction-screening" }, { label: "JPL DE Ephemeris", slug: "guides/de-ephemeris" }, ], }, { label: "Workflow Translation", items: [ { label: "From Skyfield to SQL", slug: "workflow/from-skyfield" }, { label: "From JPL Horizons to SQL", slug: "workflow/from-jpl-horizons" }, { label: "From GMAT to SQL", slug: "workflow/from-gmat" }, { label: "From Radio Jupiter Pro to SQL", slug: "workflow/from-radio-jupiter-pro" }, { label: "The SQL Advantage", slug: "workflow/sql-advantage" }, ], }, { label: "Reference", items: [ { label: "Types", slug: "reference/types" }, { label: "Functions: Satellite", slug: "reference/functions-satellite" }, { label: "Functions: Solar System", slug: "reference/functions-solar-system" }, { label: "Functions: Moons", slug: "reference/functions-moons" }, { label: "Functions: Stars & Comets", slug: "reference/functions-stars-comets" }, { label: "Functions: Radio", slug: "reference/functions-radio" }, { label: "Functions: Transfers", slug: "reference/functions-transfers" }, { label: "Functions: DE Ephemeris", slug: "reference/functions-de" }, { label: "Operators & GiST Index", slug: "reference/operators-gist" }, { label: "Body ID Reference", slug: "reference/body-ids" }, { label: "Constants & Accuracy", slug: "reference/constants-accuracy" }, ], }, { label: "Architecture", items: [ { label: "Design Principles", slug: "architecture/design-principles" }, { label: "Constant Chain of Custody", slug: "architecture/constant-chain-of-custody" }, { label: "Observation Pipeline", slug: "architecture/observation-pipeline" }, { label: "Theory-to-Code Mapping", slug: "architecture/theory-to-code" }, { label: "Memory & Thread Safety", slug: "architecture/memory-thread-safety" }, { label: "SGP4 Integration", slug: "architecture/sgp4-integration" }, ], }, { label: "Performance", items: [ { label: "Benchmarks", slug: "performance/benchmarks" }, ], }, ], }), opengraphImages({ options: { fonts: [ { name: "Inter", weight: 400, style: "normal", data: fs.readFileSync( "node_modules/@fontsource/inter/files/inter-latin-400-normal.woff" ), }, { name: "Inter", weight: 700, style: "normal", data: fs.readFileSync( "node_modules/@fontsource/inter/files/inter-latin-700-normal.woff" ), }, ], }, render: pgOrbitOgImage, }), ], markdown: { remarkPlugins: [remarkMath], rehypePlugins: [rehypeKatex], }, 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, }, }), }, }, telemetry: false, devToolbar: { enabled: false }, });