Files
rdbms-playground/website/astro.config.mjs
T
claude@clouddev1 dfb5f0b1b1 docs: move website ADR + plan into a dedicated docs/website/ namespace
The website subproject drew ADR numbers from the same global integer pool
as main, so every merge risked a collision — this already happened twice
(drafted 0042, bumped to 0044, both landing on numbers main had taken; main
has now used 0044 for relationship visualization). Give the website its own
ADR namespace so the two never compete again.

- docs/adr/0044-public-website-...md
    -> docs/website/adr/20260604-adr-website-001.md  (id: ADR-website-001)
- docs/plans/20260604-adr-0044-website.md
    -> docs/website/plans/20260604-website-implementation-plan.md
- new docs/website/adr/README.md index (dated <date>-adr-website-<NNN> seq)
- docs/adr/README.md: drop the 0044 entry, add a namespace pointer in the
  intro (keeps the list tail == merge-base, so main's 0044 merges cleanly)
- ADR-0000: record the subproject-ADR-namespace convention
- update references in STYLE.md, astro.config.mjs, the plan body

Handoff files left untouched as point-in-time history.
2026-06-10 11:04:55 +00:00

48 lines
2.1 KiB
JavaScript

// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import tailwindcss from '@tailwindcss/vite';
// Custom highlight grammar for the playground's simple-mode command language
// (advanced-mode examples use the built-in `sql` grammar). Fence with ```rdbms.
import rdbmsLang, { rdbmsSyntax } from './src/grammars/rdbms.mjs';
// https://astro.build/config
export default defineConfig({
// TODO(Phase B/SEO): set `site` to the production URL once the domain is
// known — enables the sitemap and canonical/OG URLs.
// Bind the dev/preview server to IPv4 loopback. Astro/Vite's default
// `localhost` bind resolves to IPv6 `::1` here, which breaks SSH
// `-L 4321:127.0.0.1:4321` tunnels (they target IPv4). Pinning 127.0.0.1
// keeps loopback-only access and makes tunnelling unambiguous.
server: { host: '127.0.0.1' },
integrations: [
starlight({
title: 'RDBMS Playground',
tagline: 'Learn relational databases by doing.',
// TODO(Phase B): point at the real repository once it moves to its
// public home. Omitted for now rather than linking the wrong repo.
// social: [{ icon: 'github', label: 'GitHub', href: '…' }],
customCss: ['./src/styles/global.css'],
// Register the simple-mode command grammar with Expressive Code (Shiki).
expressiveCode: { shiki: { langs: [rdbmsLang, rdbmsSyntax] } },
// Pragmatic structure (ADR-website-001 §7 / website/STYLE.md): Getting
// started, Guides, Reference, Concepts. Autogenerated per directory;
// in-section order is controlled by each page's `sidebar.order`
// frontmatter.
sidebar: [
{ label: 'Getting started', items: [{ autogenerate: { directory: 'getting-started' } }] },
{ label: 'Using the playground', items: [{ autogenerate: { directory: 'using-the-playground' } }] },
{ label: 'Guides', items: [{ autogenerate: { directory: 'guides' } }] },
{ label: 'Reference', items: [{ autogenerate: { directory: 'reference' } }] },
{ label: 'Concepts', items: [{ autogenerate: { directory: 'concepts' } }] },
],
}),
],
vite: {
plugins: [tailwindcss()],
},
});