Plain Astro — no Starlight. Five files: - package.json (astro only, v0.12.0) - astro.config.mjs (wiki.clawdie.si, static output) - src/pages/index.astro (flat list of all decision pages) - src/pages/[...slug].astro (dynamic route: reads docs/wiki/*.md) - build-wiki.sh (npm ci + astro build) Design decisions: - No Starlight — 23 pages, rarely changing, primary audience is LLMs - Dynamic routes — add a .md to docs/wiki/, it automatically gets a page - Markdown rendered at build time (frontmatter, tables, code blocks, links) - Wiki links [label](./page.md) auto-resolve to [/page/] - Dark mode via prefers-color-scheme, no JS Guide keeps Starlight (structured sidebar, human operators). Wiki gets plain Astro (flat list, agent audience). See: docs/PLAN-WIKI-CLAWDIE-SI.md
29 lines
801 B
Bash
Executable file
29 lines
801 B
Bash
Executable file
#!/bin/sh
|
|
# Build the Colibri wiki site — plain Astro, no Starlight.
|
|
#
|
|
# Prerequisites: Node.js + npm (node24 npm-node24 on FreeBSD).
|
|
# cd astro/wiki && npm ci
|
|
#
|
|
# Usage:
|
|
# ./scripts/build-wiki.sh # build to astro/wiki/dist/
|
|
# ./scripts/build-wiki.sh --preview # dev server at localhost:4321
|
|
#
|
|
# Site URL override:
|
|
# ASTRO_SITE_URL=https://wiki.clawdie.si ./scripts/build-wiki.sh
|
|
|
|
set -eu
|
|
|
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
REPO_ROOT=$(cd "$SCRIPT_DIR/.." && pwd)
|
|
WIKI_DIR="$REPO_ROOT/astro/wiki"
|
|
|
|
cd "$WIKI_DIR"
|
|
|
|
if [ "${1:-}" = "--preview" ]; then
|
|
echo "==> wiki dev server (http://localhost:4321)"
|
|
npx astro dev --host 0.0.0.0
|
|
else
|
|
echo "==> building wiki ($WIKI_DIR)"
|
|
npx astro build
|
|
echo "==> wiki built → $WIKI_DIR/dist/"
|
|
fi
|