prism site
Generate static websites from PRISM data.
Commands
generate
Generate a multi-page static site from capability stacks, maturity models, and state documents.
Generated Site Structure:
- Homepage with cards linking to all capability stacks
- Stack pages with filterable capability grids
- Capability detail pages with SLI metrics
Standard PRISM Directory Structure
PRISM supports a standard directory structure that enables auto-discovery of related files:
{stack-name}/
├── stack.json # Capability stack definition
├── model.json # Maturity model (SLIs, levels, criteria)
├── state.json # Current state (SLI values)
└── roadmap.json # Journey roadmap (optional, generates timeline page)
When roadmap.json is present, the generator creates a roadmap/index.html page with a timeline visualization of capability journeys.
When using the standard structure, all files are auto-discovered:
Or point to a parent directory containing multiple stack directories:
stacks/
├── security/
│ ├── stack.json
│ ├── model.json
│ └── state.json
└── reliability/
├── stack.json
├── model.json
└── state.json
Legacy Mode
For non-standard layouts, use --models and --states directories:
prism site generate \
--stack=./stacks/security.json \
--models=./models/ \
--states=./states/ \
--output=./dist
Model/state files are matched by naming convention:
{basename}-model.jsonor{basename}/model.json{basename}-state.jsonor{basename}/state.json
Flags
| Flag | Default | Description |
|---|---|---|
--stack |
(required) | Capability stack file(s) or directory (can be repeated) |
--output, -o |
./dist |
Output directory for generated site |
--title |
PRISM Dashboard |
Site title |
--description |
Capability maturity dashboard |
Site description |
--theme |
dark |
Theme: light or dark |
--base-url |
Base URL for the site (for absolute links) | |
--models |
Directory containing maturity model JSON files (legacy mode) | |
--states |
Directory containing state JSON files (legacy mode) | |
--site-nav-js |
Path to site-nav JavaScript bundle | |
--prism-ui-js |
Path to @grokify/prism UI bundle for Lit components | |
--aggregation |
min |
Maturity aggregation method: min or avg |
--hide-generated-by |
false |
Hide "Generated by PRISM" footer |
Examples
Single standard stack directory
Multiple standard stack directories
prism site generate \
--stack=./security/ \
--stack=./reliability/ \
--output=./dist \
--title="PRISM Dashboard"
Parent directory with multiple stacks
Legacy: separate files with models/states directories
prism site generate \
--stack=./security-stack.json \
--models=./models/ \
--states=./states/ \
--output=./dist
With site-nav web components
prism site generate \
--stack=./stacks/ \
--output=./dist \
--site-nav-js=./node_modules/@grokify/site-nav/dist/site-nav.es.js
Output Structure
The generated site follows this structure:
dist/
├── index.html # Homepage with stack cards
├── assets/
│ └── styles.css # Theme-aware CSS
├── {stack-basename}/
│ ├── index.html # Stack overview with capability grid
│ ├── roadmap/
│ │ └── index.html # Roadmap timeline (if roadmap.json exists)
│ └── {capability-id}.html # Capability detail pages
└── site-nav.es.js # (optional) Web components bundle
Roadmap Pages
When a roadmap.json file is present in a stack directory, the generator creates a roadmap timeline page at {stack}/roadmap/index.html.
With --prism-ui-js, the page uses the interactive <roadmap-timeline> Lit component. Without it, a static HTML table is rendered.
Theming
The generated site supports both light and dark themes. The default theme is dark.
When using the site-nav JavaScript bundle, users can toggle between themes using the theme toggle control in the navigation.
Without the JavaScript bundle, the site uses CSS-only theming with graceful fallbacks for badges and status indicators.
CSS Custom Properties
The site uses CSS custom properties for theming. Override these in your own CSS: