mcesptool/docs-site/astro.config.mjs
Ryan Malloy ef19d19da2 Add ESP-IDF integration component with two-tier loading
Fix idf.py path bug (tools/idf.py in ESP-IDF v5.x) that prevented
auto-detection. Add get_idf_path_found() for toolchain management
without requiring a fully configured environment.

Tier 1 (idf_path_found): idf_tools_list, idf_tools_check,
idf_tools_install, idf_env_info — always available when IDF directory
exists with idf_tools.py.

Tier 2 (idf_available): idf_build_project, idf_flash_project,
idf_monitor — require full IDF env, gate checked at invocation time
so they unlock after install without restart.

Includes input validation (target names, tool names, baud rates),
centralized subprocess cleanup via _run_idf_py, mtime-based cache
invalidation for tools.json, and esp://idf/status resource with
per-target readiness map.
2026-02-25 19:52:50 -07:00

129 lines
3.7 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: "seti:git",
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: "IDF Integration",
slug: "reference/idf-integration",
},
],
},
{ 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,
},
}),
},
},
});