Skip to content

Sub-Site Manifest

Every sub-site inside sites/ is registered by placing a site.manifest.json file at its root. During npm run build, scripts/build.mjs scans sites/ recursively, validates all manifests before building, and aggregates them into hub/manifest.generated.json.

Field Required Type Default Description
title Yes string — Display title shown on the JoeDocs card.
slug Yes string — Globally unique URL segment (^[a-z0-9_-]+$).
description Yes string — Concise summary displayed on the JoeDocs index.
outDir Yes string — Relative build output folder inside the sub-site (dist, build, out, or .).
buildCommand No string | null "npm run build" Command run to produce outDir. Use null or "" for plain static HTML.
installCommand No string | null Auto-detected Defaults to npm ci when package-lock.json exists, npm install if only package.json exists, or skipped.
tags No string[] [] Topic chips used for search and filtering in JoeDocs.
framework No string | null null Optional framework label indexed for search.
icon No string | null "file-text" Built-in icon name (book, file-text, compass, code, terminal, layers, rocket, box, globe, shield, wrench) or relative/URL image path for the card icon.
links No { label, path }[] [] Quick-jump links rendered on the card, resolved relative to /<slug>/.
  • Slugs must match ^[a-z0-9_-]+$ and be unique across the entire sites/ tree.
  • outDir must resolve inside the sub-site folder (path traversal outside the sub-site is rejected).
  • When outDir is ".", scripts/build.mjs excludes site.manifest.json, package.json, package-lock.json, node_modules, .git, and .DS_Store from dist/<slug>/.

During both installCommand and buildCommand, each sub-site receives:

  • ROOT_BASE: Normalized root path (/ or /JoeDocs/).
  • SITE_BASE: Full mounted subpath for the sub-site (/<slug>/ or /JoeDocs/<slug>/).
  • SITE_SLUG: The validated slug string.