936d9254c0
Restructure the docs into five top-level sections, splitting the application you drive from the database language you build with. - New "Using the playground" section: command-line options; the assistive editor (completion, highlighting, [ERR]/[WRN] indicator, hints, in-line editing); the output pane (scrolling); projects (save/load/new/rebuild); undo/redo & history; export & import; clipboard; getting help. Grounded in the in-app help/usage and ADR-0003/0022/0027. - Reference: seed the remaining topic pages (Columns, Relationships, Indexes, Constraints, Inserting & editing data, Querying & inspecting) with real syntax synopses; worked examples to follow. - Surface the assistive editor on the landing page and in Getting started; restore cross-links now that targets exist. Plan + STYLE updated to the five-section structure. 24 pages, build green, links resolve, content clean; planned features carry "planned" callouts.
48 lines
2.1 KiB
JavaScript
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-0044 §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()],
|
|
},
|
|
});
|