mcnoaa-tides/docs/astro.config.mjs
Ryan Malloy a5009941ab Add OG social cards, Mermaid diagrams, and robots.txt
- OG images: auto-generated per page via astro-og-canvas with maritime
  teal theme, wired through Starlight route data middleware
- Mermaid: request flow and parallel fetch diagrams on architecture page
- robots.txt: sitemap and llms.txt references for crawlers
2026-02-24 13:33:34 -07:00

106 lines
3.4 KiB
JavaScript

import { defineConfig } from "astro/config";
import mermaid from "astro-mermaid";
import starlight from "@astrojs/starlight";
import starlightLlmsTxt from "starlight-llms-txt";
const domain = process.env.DOMAIN || "localhost:4321";
const protocol = domain.startsWith("localhost") ? "http" : "https";
export default defineConfig({
site: `${protocol}://${domain}`,
telemetry: false,
devToolbar: { enabled: false },
integrations: [
mermaid(),
starlight({
title: "mcnoaa-tides",
description:
"FastMCP server for NOAA CO-OPS tide predictions, water levels, and marine conditions.",
routeMiddleware: "./src/routeData.ts",
plugins: [
starlightLlmsTxt({
projectName: "mcnoaa-tides",
description:
"mcnoaa-tides is an MCP (Model Context Protocol) server that connects " +
"assistants to the NOAA CO-OPS Tides and Currents API. It exposes tide " +
"predictions, observed water levels, and meteorological observations from " +
"approximately 301 U.S. coastal stations through 14 tools, 4 prompt " +
"templates, and 3 MCP resources.",
details: [
"## Key facts",
"",
"- Install: `uvx mcnoaa-tides` (no permanent install needed)",
"- Transport: stdio (default) or streamable-http (`MCP_TRANSPORT=streamable-http MCP_PORT=8000`)",
"- Visualization requires the optional `viz` extras: `uv pip install mcnoaa-tides[viz]`",
"- No API keys required — NOAA data is free and public",
"- Data source: [NOAA CO-OPS API](https://tidesandcurrents.noaa.gov/api/)",
].join("\n"),
promote: ["index*", "getting-started/*"],
demote: ["understanding/built-with"],
optionalLinks: [
{
label: "Source code",
url: "https://git.supported.systems/MCP/mcnoaa-tides",
description: "Gitea repository with full server and docs source",
},
{
label: "PyPI package",
url: "https://pypi.org/project/mcnoaa-tides/",
description: "Python package registry listing",
},
],
}),
],
customCss: [
"@fontsource/inter/400.css",
"@fontsource/inter/600.css",
"@fontsource/jetbrains-mono/400.css",
"./src/styles/custom.css",
],
social: [
{
icon: "seti:git",
label: "Source",
href: "https://git.supported.systems/MCP/mcnoaa-tides",
},
{
icon: "seti:python",
label: "PyPI",
href: "https://pypi.org/project/mcnoaa-tides/",
},
],
sidebar: [
{
label: "Getting Started",
autogenerate: { directory: "getting-started" },
},
{
label: "How-To Guides",
autogenerate: { directory: "how-to" },
},
{
label: "Reference",
autogenerate: { directory: "reference" },
},
{
label: "Understanding",
autogenerate: { directory: "understanding" },
},
],
}),
],
vite: {
server: {
host: "0.0.0.0",
allowedHosts: [domain.split(":")[0]],
...(process.env.VITE_HMR_HOST && {
hmr: {
host: process.env.VITE_HMR_HOST,
protocol: "wss",
clientPort: 443,
},
}),
},
},
});