komentoscript-pages

KomentoScript Pages Builder

Static site generator for KomentoScript packs in sites/.

[!WARNING]
KomentoScript is in early-phase undergoing testing & can be subject to change. Documentation will be more limited during initial development & testing periods.

Build output includes:

Quick start

  1. Install Node.js 20+.
  2. Put your KomentoScript JSON packs into sites/ (for more information read the schema or documentation).
  3. Build the static site:
npm install
npm run build

Generated files are written to dist/.

KomentoScript behavior in this project

This generator follows the following shape:

Folder layout

sites/                  # Your source JSON packs
scripts/build.mjs       # Build-time generator
scripts/validation/     # Schema + validator modules
scripts/validation/schema/komentoscript-pack.schema.json  # JSON Schema
templates/root.html     # Home page HTML template
templates/assets/       # Static CSS/JS copied to dist/assets

Deploy

GitHub Pages

This repo includes a GitHub Actions workflow at .github/workflows/deploy-github-pages.yml.

  1. In repository settings, enable Pages and set source to GitHub Actions.
  2. Push to main.
  3. The workflow builds and deploys dist/.

Deploy to GitHub Pages

Cloudflare Pages

Deploy to Cloudflare

Netlify

This repo includes netlify.toml.

Deploy to Netlify

Local preview

Any static server works. For example:

npx serve dist

Then open /, /all, and /<id> routes, where <id> is the pack ID from your JSON files.