Files
systemic-game-design-course/site/astro.config.mjs
T
Lucas WintherandClaude Opus 5.5 1c2fb2eb07
CI / Tool tests and sync-check (push) Successful in 13s
CI / Verify references (all modules, Rust and TS) (push) Successful in 1m52s
CI / Coupling audit on references (push) Successful in 12s
CI / Site build (push) Successful in 23s
CI / Naive engine tests (Module 0) (push) Successful in 31s
fix: site URL falls back to localhost when COURSE_HOST is unset
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 18:42:18 +01:00

30 lines
1.0 KiB
JavaScript

import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
// The site is served at the root of its own subdomain. Set COURSE_HOST at build time
// (e.g. COURSE_HOST=course.example.com). Unset means a local run (http://localhost:4321);
// deploys must not rely on this: deploy/Dockerfile and docker-compose.yml require COURSE_HOST.
const host = process.env.COURSE_HOST;
export default defineConfig({
site: host ? `https://${host}` : "http://localhost:4321",
base: "/",
integrations: [
starlight({
title: "Systemic Design Course",
description: "A free, hands-on course on extensible systemic game design, in Rust and TypeScript.",
social: [
{
icon: "external",
label: "Source repository",
href: "https://gitea.lucaswinther.info/lucasw89/systemic-game-design-course",
},
],
sidebar: [
{ label: "Start here", items: ["disclaimer", "about"] },
{ label: "Modules", items: [{ autogenerate: { directory: "course" } }] },
],
}),
],
});