17-page Astro/Starlight site mirroring the bingham/cucx conventions
(telemetry off, devToolbar off, astro-icon + lucide, separate
custom.css, Diátaxis-structured sidebar with autogenerate per
directory). Green accent palette differentiates from bingham/cucx's
teal.
Pages by Diátaxis quadrant:
- Getting Started (3): installation, configuration, first-audit
- How-To (4): sip-trunk-report (port from docs/query-patterns/),
route-plan-overview, investigate-pattern (mermaid flowchart),
find-orphan-resources
- Reference (4): tools (all 19), prompts (all 10), env-vars,
cucm-schema-cheatsheet
- Explanation (4): read-only-by-structure, cluster-isolated-cache,
hamilton-review-patterns, pypi-yank-lesson
Build-verified clean (npm run build → 17 pages in 7.88s, pagefind
search index built across all pages, zero errors).
Legacy docs/query-patterns/sip-trunk-report.md kept in place — that
file ships in the published Python sdist's docs/ tree, deletion would
be a package change not just a docs-site change. The new how-to
version is a near-verbatim port.
Content gaps for follow-up: real cluster-output examples in tool/
prompt reference pages, verified CUCM 15 SQL in
find-orphan-resources.md, optional favicon.
Not yet wired for deployment (Caddyfile/Dockerfile out of scope for
v1). Local preview: cd docs && npm run dev.
134 lines
3.7 KiB
JavaScript
134 lines
3.7 KiB
JavaScript
// @ts-check
|
|
import { defineConfig } from 'astro/config';
|
|
import starlight from '@astrojs/starlight';
|
|
import icon from 'astro-icon';
|
|
import mermaid from 'astro-mermaid';
|
|
import starlightPageActions from 'starlight-page-actions';
|
|
|
|
// Reverse-proxy / HMR awareness. `DOMAIN` is injected by docker-compose
|
|
// (DEV_DOMAIN for the dev service, DOMAIN for prod). When unset, we
|
|
// assume plain local dev on http://localhost:4321.
|
|
const DOMAIN = process.env.DOMAIN || 'localhost';
|
|
const IS_BEHIND_PROXY = DOMAIN !== 'localhost';
|
|
|
|
export default defineConfig({
|
|
// Disabled per workspace convention.
|
|
telemetry: false,
|
|
devToolbar: { enabled: false },
|
|
|
|
site: IS_BEHIND_PROXY ? `https://${DOMAIN}` : undefined,
|
|
|
|
// Shiki doesn't ship a Cisco IOS grammar. Map `cisco` → `ini` (closest
|
|
// visual match — `!` line comments, "keyword value" shape). Silences
|
|
// build-time warnings for any Cisco code fences in narrative pages.
|
|
// `env` (dotenv files) → `bash` so the KEY=value syntax highlights.
|
|
markdown: {
|
|
shikiConfig: {
|
|
langAlias: {
|
|
cisco: 'ini',
|
|
env: 'bash',
|
|
},
|
|
},
|
|
},
|
|
|
|
integrations: [
|
|
// Mermaid must come BEFORE starlight — its remark/rehype plugin has
|
|
// to register before Starlight sets up its MDX pipeline. Renders
|
|
// client-side (no build-time SVG generation).
|
|
mermaid({
|
|
theme: 'default',
|
|
autoTheme: true, // follows light/dark mode toggle
|
|
}),
|
|
icon({
|
|
include: {
|
|
lucide: ['*'],
|
|
},
|
|
}),
|
|
starlight({
|
|
title: 'mcaxl docs',
|
|
description:
|
|
'Read-only MCP server for Cisco Unified Communications Manager (CUCM) — AXL SOAP API + RisPort70 audit. Documentation.',
|
|
logo: {
|
|
src: './src/assets/logo.svg',
|
|
replacesTitle: false,
|
|
},
|
|
customCss: ['./src/styles/custom.css'],
|
|
|
|
// Per-page action buttons: "Copy Markdown" + "View in Markdown"
|
|
// (.md route) + "Share" menus. Open-in-AI actions disabled because
|
|
// they assume the third-party AI can fetch the URL — fine here for
|
|
// a public site, but kept off to match the operator preference for
|
|
// copy-and-paste handoffs.
|
|
plugins: [
|
|
starlightPageActions({
|
|
actions: {
|
|
chatgpt: false,
|
|
claude: false,
|
|
},
|
|
}),
|
|
],
|
|
|
|
lastUpdated: true,
|
|
pagination: true,
|
|
social: [
|
|
{
|
|
icon: 'external',
|
|
label: 'PyPI',
|
|
href: 'https://pypi.org/project/mcaxl/',
|
|
},
|
|
{
|
|
icon: 'external',
|
|
label: 'Gitea repo',
|
|
href: 'https://git.supported.systems/mcp/mcaxl',
|
|
},
|
|
],
|
|
editLink: {
|
|
baseUrl: 'https://git.supported.systems/mcp/mcaxl/_edit/main/docs/',
|
|
},
|
|
sidebar: [
|
|
{
|
|
label: 'Overview',
|
|
items: [
|
|
{ label: 'Home', link: '/' },
|
|
],
|
|
},
|
|
{
|
|
label: 'Getting started',
|
|
collapsed: false,
|
|
autogenerate: { directory: 'getting-started' },
|
|
},
|
|
{
|
|
label: 'How-to guides',
|
|
collapsed: false,
|
|
autogenerate: { directory: 'how-to' },
|
|
},
|
|
{
|
|
label: 'Reference',
|
|
collapsed: false,
|
|
autogenerate: { directory: 'reference' },
|
|
},
|
|
{
|
|
label: 'Explanation',
|
|
collapsed: true,
|
|
autogenerate: { directory: 'explanation' },
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
|
|
vite: {
|
|
server: {
|
|
host: '0.0.0.0',
|
|
// HMR survives behind a Caddy-terminated TLS reverse proxy when
|
|
// configured this way. Leaves localhost dev untouched.
|
|
hmr: IS_BEHIND_PROXY
|
|
? {
|
|
host: DOMAIN,
|
|
protocol: 'wss',
|
|
clientPort: 443,
|
|
}
|
|
: undefined,
|
|
},
|
|
},
|
|
});
|