__smm_static_temp_content__

Build Output and Assets

Static site generation (SSG)

The CLI generates a fully static site. Every route gets its own .html file with pre-rendered markdown content baked into the DOM. The site works without JavaScript — search engines see all content, and the page is immediately readable.

Once the JS bundle loads, the React SPA hydrates and takes over navigation for seamless client-side transitions.

Build flow

  1. Markdown files are scanned and parsed into route/content JSON.
  2. Generated route data is written under web/src/.generated/.
  3. Vite builds the web app (CSS + JS bundles).
  4. Static HTML pages are generated for each route via buildDistRoutesFromRouteTree.
  5. The built dist/ directory is copied to the target docs directory.

Generated files

File Purpose
.generated/output.json Route metadata and parsed markdown content for all pages
.generated/paths.json Nested route tree used to render sidebar groups and collapsibles

Public assets

If publicPath is configured in smm.config.json and the directory exists, its contents are copied into the web app's public/ directory before the Vite build. This is useful for images, fonts, or other static files.

Output structure

dist/
  index.html              ← home page (pre-rendered)
  getting-started.html    ← each route gets its own .html
  cli-reference.html
  smm-config/
    index.html
    defaults-and-options.html
    trim-and-ordering.html
  assets/
    index-abc123.css       ← Vite-built CSS
    index-abc123.js        ← Vite-built JS (hydration)

Defaults

If no smm.config.json or .smmignore exists, built-in defaults are used automatically.