From dcb8eeda4efb89624c29e415b2802f2452c55d84 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 15 Aug 2026 02:46:11 -0700 Subject: [PATCH] chore: add regenerate-catalog-docs.sh for future template additions Whenever app-templates.js gains or changes a template, run this script to keep /docs/catalog in sync. It generates all 78 static pages and verifies the Next.js build still passes. --- scripts/regenerate-catalog-docs.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/regenerate-catalog-docs.sh diff --git a/scripts/regenerate-catalog-docs.sh b/scripts/regenerate-catalog-docs.sh new file mode 100755 index 0000000..c3aacbf --- /dev/null +++ b/scripts/regenerate-catalog-docs.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# Regenerate the /docs/catalog tree from the current +# /opt/dashcaddy/dashcaddy-api/src/docker/app-templates.js. +# +# Run this whenever templates are added/changed. Outputs 78 static pages +# under src/app/docs/catalog/ (1 index + 77 per-template). +# +# Idempotent — overwrites in place. +set -euo pipefail +cd "$(dirname "$0")/.." +node /tmp/generate-template-docs.js +echo "Verifying build..." +npx --no-install next build 2>&1 | tail -3 +echo "Done. Review with: git diff --stat src/app/docs/catalog/" \ No newline at end of file