Files
core/website/astro.config.mjs
T
chrnx 92987d0a24 docs(observability): document the contract, and retire the sentence that denied it
Task 8. README.md led its Honest scope section with "No observability layer,
either." — the single most load-bearing sentence in the CTO assessment, and now
false. It says what exists instead, and keeps being explicit about what does
not: no metrics registry and no OpenTelemetry exporter in core, because core has
one runtime dependency and intends to keep it.

Adds a guide covering the parts that are contracts rather than implementation
details, since those are the ones a reader gets wrong: route labels carry the
pattern and never the concrete path (labelling metrics on raw URLs is how you
take down a metrics backend), request:end fires when the handler returns rather
than when a stream closes, and streams emit lifecycle events only.

The plugins guide was titled "Plugins & observability" and carried a partial
event list that had already drifted. It now covers plugins and points at the
guide for the vocabulary, with the correlation note it was missing.

Includes the measured cost, because a performance claim without a number is
marketing: -3.9% on JSON hello, -2.1% on a three-step pipeline, and the reason
the shallower route loses more.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-16 15:06:54 -05:00

78 lines
3.0 KiB
JavaScript

import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
// Docs site for @green-tea/core. Content lives in src/content/docs/**.
export default defineConfig({
site: 'https://green-tea.expressive-tea.io',
base: '/docs',
integrations: [
starlight({
// GoatCounter — same site code as the marketing site, so /docs traffic lands in
// the same dashboard and referrer paths stay comparable.
head: [
{
tag: 'script',
attrs: {
'data-goatcounter': 'https://greentea.goatcounter.com/count',
async: true,
src: '//gc.zgo.at/count.js',
},
},
],
// Let the content-backed 404.md own /404; otherwise Astro also injects a conflicting route.
disable404Route: true,
title: 'Green Tea.',
description: 'A zen, opinionated, type-safe framework — your API is a graph, not a chain.',
logo: { src: './src/assets/logo.svg', alt: 'Green Tea' },
favicon: '/favicon.svg',
customCss: ['./src/styles/brand.css'],
tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 3 },
sidebar: [
{
label: 'Start here',
items: [
{ label: 'Introduction', link: '/' },
{ label: 'Getting started', slug: 'getting-started' },
],
},
{
label: 'Concepts',
items: [
{ label: 'The dependency graph', slug: 'concepts/the-graph' },
{ label: 'The typed flow core', slug: 'concepts/flow' },
],
},
{
label: 'Guides',
items: [
{ label: 'The matcha CLI', slug: 'guides/cli' },
{ label: 'Routing', slug: 'guides/routing' },
{ label: 'Dependency injection', slug: 'guides/dependency-injection' },
{ label: 'Argument decorators', slug: 'guides/arguments' },
{ label: 'Validation', slug: 'guides/validation' },
{ label: 'Error handling', slug: 'guides/errors' },
{ label: 'Streaming & real-time', slug: 'guides/streaming' },
{ label: 'File uploads', slug: 'guides/uploads' },
{ label: 'HTML & views', slug: 'guides/html' },
{ label: 'Transport security', slug: 'guides/security' },
{ label: 'Plugins', slug: 'guides/plugins' },
{ label: 'Observability', slug: 'guides/observability' },
{ label: 'Graph introspection', slug: 'guides/introspection' },
{ label: 'OpenAPI', slug: 'guides/openapi' },
{ label: 'Runtimes', slug: 'guides/runtimes' },
{ label: 'Testing', slug: 'guides/testing' },
{ label: 'Mesh (alpha)', slug: 'guides/mesh', badge: { text: 'alpha', variant: 'caution' } },
],
},
{
label: 'Reference',
items: [
{ label: 'Decorators', slug: 'reference/decorators' },
{ label: 'createApp options', slug: 'reference/createapp' },
],
},
],
}),
],
});