mcesptool/docs-site/astro.config.mjs
Ryan Malloy f8dfa90fba Add live product catalog to docs site
Espressif product data fetched at build time via Content Layer API
and rendered as browsable Starlight pages. Alpine.js provides
client-side filtering by series, type, connectivity, and status.

- Products content collection with inline API loader + Zod schema
- Filterable browse page at /products/ with card grid
- Individual spec sheet pages at /products/[id]/ (94 products)
- Separate CSS with dark/light theme support
- Sidebar section linking to catalog
- Cross-references to MCP tool reference docs
2026-02-25 16:02:43 -07:00

125 lines
3.5 KiB
JavaScript

import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import alpinejs from "@astrojs/alpinejs";
import tailwindcss from "@tailwindcss/vite";
import sitemap from "@astrojs/sitemap";
export default defineConfig({
site: "https://mcesptool.warehack.ing",
telemetry: false,
devToolbar: { enabled: false },
integrations: [
alpinejs(),
starlight({
title: "mcesptool",
description:
"ESP32 and ESP8266 development through Model Context Protocol",
favicon: "/favicon.svg",
social: [
{
icon: "github",
label: "Source",
href: "https://git.supported.systems/MCP/mcesptool",
},
],
customCss: ["./src/styles/global.css", "./src/styles/products.css"],
sidebar: [
{
label: "Tutorials",
items: [
{ label: "Getting Started", slug: "tutorials/getting-started" },
{ label: "First Flash", slug: "tutorials/first-flash" },
{
label: "First QEMU Session",
slug: "tutorials/first-qemu-session",
},
],
},
{
label: "How-To Guides",
autogenerate: { directory: "guides" },
},
{
label: "Reference",
items: [
{ label: "Overview", slug: "reference" },
{
label: "Tool Reference",
collapsed: true,
items: [
{
label: "Chip Control",
slug: "reference/chip-control",
},
{
label: "Flash Operations",
slug: "reference/flash-operations",
},
{
label: "Partition Management",
slug: "reference/partition-management",
},
{ label: "Security", slug: "reference/security" },
{
label: "Firmware Builder",
slug: "reference/firmware-builder",
},
{
label: "OTA Management",
slug: "reference/ota-management",
},
{
label: "Production Tools",
slug: "reference/production-tools",
},
{
label: "Diagnostics",
slug: "reference/diagnostics",
},
{
label: "QEMU Manager",
slug: "reference/qemu-manager",
},
{
label: "Server Tools",
slug: "reference/server-tools",
},
{
label: "Product Catalog",
slug: "reference/product-catalog",
},
],
},
{ label: "Resources", slug: "reference/resources" },
{ label: "Configuration", slug: "reference/configuration" },
],
},
{
label: "Product Catalog",
items: [
{ label: "Browse Products", link: "/products/" },
],
},
{
label: "Explanation",
autogenerate: { directory: "explanation" },
},
],
}),
sitemap(),
],
vite: {
plugins: [tailwindcss()],
server: {
host: "0.0.0.0",
...(process.env.VITE_HMR_HOST && {
hmr: {
host: process.env.VITE_HMR_HOST,
protocol: "wss",
clientPort: 443,
},
}),
},
},
});