2026-05-22 10:21:10 -04:00
|
|
|
import { defineConfig } from "astro/config";
|
|
|
|
|
import starlight from "@astrojs/starlight";
|
|
|
|
|
import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi";
|
|
|
|
|
|
2026-05-22 14:20:10 -04:00
|
|
|
// The OpenAPI spec is vendored from server/openapi.json by
|
|
|
|
|
// scripts/sync-sources.mjs (runs as predev/prebuild). We point at the
|
|
|
|
|
// vendored copy so the build is self-contained — Vercel only uploads
|
|
|
|
|
// the docs/api/ subtree, so paths outside this directory are not
|
|
|
|
|
// available at build time.
|
|
|
|
|
const OPENAPI_PATH = "./src/vendored/openapi.json";
|
2026-05-22 10:21:10 -04:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
// Served at https://checkmate.so/docs — the leading slash is included so
|
|
|
|
|
// every internal link resolves correctly when fronted by a reverse proxy.
|
|
|
|
|
base: "/docs",
|
|
|
|
|
site: "https://checkmate.so",
|
|
|
|
|
|
|
|
|
|
integrations: [
|
|
|
|
|
starlight({
|
|
|
|
|
title: "Checkmate API",
|
|
|
|
|
description: "Use the Checkmate REST API to manage monitors, incidents, status pages, notifications, and users programmatically.",
|
|
|
|
|
|
|
|
|
|
// Prose markdown is loaded from /docs/api-content via the custom
|
|
|
|
|
// docsLoader in src/content.config.ts. Keeping content outside the
|
|
|
|
|
// Astro project tree means contributors can edit it without dealing
|
|
|
|
|
// with Astro / Starlight tooling.
|
|
|
|
|
|
|
|
|
|
logo: {
|
|
|
|
|
src: "./src/assets/logo.svg",
|
|
|
|
|
replacesTitle: true,
|
|
|
|
|
},
|
|
|
|
|
favicon: "/favicon.svg",
|
|
|
|
|
customCss: ["./src/styles/checkmate.css"],
|
|
|
|
|
|
|
|
|
|
social: {
|
|
|
|
|
github: "https://github.com/bluewave-labs/Checkmate",
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-22 10:25:06 -04:00
|
|
|
// Inject a "Releases" link into the site header.
|
|
|
|
|
components: {
|
|
|
|
|
SocialIcons: "./src/components/HeaderLinks.astro",
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-22 10:21:10 -04:00
|
|
|
sidebar: [
|
|
|
|
|
{
|
|
|
|
|
label: "Getting started",
|
|
|
|
|
items: [
|
2026-05-22 14:04:52 -04:00
|
|
|
{ label: "Introduction", slug: "" },
|
2026-05-22 10:21:10 -04:00
|
|
|
{ label: "Quickstart", slug: "quickstart" },
|
|
|
|
|
{ label: "Authentication", slug: "authentication" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "Core concepts",
|
|
|
|
|
items: [
|
|
|
|
|
{ label: "Conventions", slug: "conventions" },
|
|
|
|
|
{ label: "Errors", slug: "errors" },
|
|
|
|
|
{ label: "Rate limiting", slug: "rate-limiting" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "API reference",
|
|
|
|
|
items: [
|
|
|
|
|
{ label: "Overview", slug: "api-reference/overview" },
|
|
|
|
|
// The OpenAPI plugin appends every endpoint under this group.
|
|
|
|
|
...openAPISidebarGroups,
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
plugins: [
|
|
|
|
|
starlightOpenAPI([
|
|
|
|
|
{
|
|
|
|
|
base: "api-reference",
|
|
|
|
|
label: "REST API",
|
|
|
|
|
schema: OPENAPI_PATH,
|
|
|
|
|
},
|
|
|
|
|
]),
|
|
|
|
|
],
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
});
|