Static-Content Generator

Use this shape when a static site needs Markdown pages, pretty routes, copied assets, and a custom document shell.

Recipe docsRecipes

Required Packages

  • @macavitymadcap/hyper-dank-automation/content for front matter, Markdown rendering, route output paths, relative URL rewriting, page discovery, and static content builds.
  • @macavitymadcap/hyper-dank-automation for static artifact smoke checks and local server helpers around the generated output.
import { buildStaticContentSite, escapeHtml } from "@macavitymadcap/hyper-dank-automation/content";

await buildStaticContentSite({
  assets: [{ from: "site/assets", to: "assets" }],
  basePath: "/docs",
  destinationDir: "public",
  renderDocument: ({ content, page }) =>
    `<!doctype html><title>${escapeHtml(page.title)}</title><main>${content}</main>`,
  sourceDir: "site",
});

App-Owned Responsibilities

The app owns document chrome, CSS, deployment layout, taxonomy, RSS, search, accessibility evidence, legal claims, and product metadata.

Verification

Test generated routes, copied assets, rewritten links, important Markdown features, and a local browser pass over the built artifact.

References

Automation, Static blog recipe, and Verification.