mcqemu/docs-site/astro.config.mjs
Ryan Malloy 235ffc955c Add the recorded talk, a player, and the Supported Systems badge
The talk exists as audio now: a synthesised narration, four and a half
minutes, on a /talk/ page with the full transcript underneath. The transcript
is the authoritative version, and the audio is preload="none" so the 2.5 MB
file is only fetched if somebody presses play. A second player sits on the
homepage, the way spicebook surfaces its pitch.

The badge follows the homestar.ink pattern: a small webring-style button in
the footer that opens a short modal about the studio. It is a Starlight footer
override, so it appears site-wide rather than only on the landing page, and it
closes on Escape or backdrop click with focus returned to the badge.

Talk script and narration text are kept in drafts/ for reuse.
2026-08-18 14:43:16 -06:00

101 lines
3.0 KiB
JavaScript

// mcqemu docs — Starlight with a diataxis-shaped sidebar.
//
// Telemetry and devToolbar are off per project convention. The HMR block
// matters when the dev server runs behind Caddy: Vite's WebSocket needs an
// explicit host, protocol and clientPort or HMR drops every few seconds
// with "server connection lost".
//
// DOMAIN drives both the canonical site URL and the HMR host, so the same
// image serves mcqemu.warehack.ing (prod) and mcqemu.l.warehack.ing (dev).
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";
import remarkGfm from "remark-gfm";
import starlightLinksValidator from "starlight-links-validator";
const domain = process.env.DOMAIN ?? "mcqemu.warehack.ing";
export default defineConfig({
site: `https://${domain}`,
telemetry: false,
devToolbar: { enabled: false },
vite: {
server: {
host: "0.0.0.0",
hmr: {
host: domain,
protocol: "wss",
clientPort: 443,
},
},
},
integrations: [
starlight({
title: "mcqemu",
description:
"MCP server for QEMU: VM lifecycle, disposable sandboxes, live snapshots, guest-agent access, and screenshot-driven control.",
favicon: "/favicon.svg",
customCss: ["./src/styles/theme.css"],
// Keep the default footer and hang the studio badge under it.
components: {
Footer: "./src/components/Footer.astro",
},
social: [
{
icon: "seti:git",
label: "Source",
href: "https://git.supported.systems/warehack.ing/mcqemu",
},
],
// Diataxis order: orientation, then learning, then doing, then
// looking up, then understanding.
// Starlight v0.39+ needs {label, items:[{autogenerate}]}; the inline
// {label, autogenerate} shorthand was removed.
sidebar: [
{
label: "Start here",
items: [
{ label: "What is mcqemu?", slug: "overview" },
{ label: "The talk", slug: "talk" },
],
},
{
label: "Tutorial",
items: [{ autogenerate: { directory: "tutorial" } }],
},
{
label: "How-to",
items: [{ autogenerate: { directory: "how-to" } }],
},
{
label: "Reference",
items: [{ autogenerate: { directory: "reference" } }],
},
{
label: "Explanation",
items: [{ autogenerate: { directory: "explanation" } }],
},
],
plugins: [
// Broken internal links fail the build instead of shipping.
starlightLinksValidator({ errorOnRelativeLinks: false }),
],
pagination: true,
lastUpdated: true,
}),
// Astro enables GFM for .md, but the MDX pipeline does not inherit it,
// so tables render as run-together paragraphs without this.
mdx({ remarkPlugins: [remarkGfm] }),
sitemap(),
],
});