Feature: Provide a modern project scaffold / starter template
Author: cschanhniemCreated Jun 19, 2026Updated Jun 22, 2026
Problem
Metalsmith's examples/ directory contains several demo projects (jekyll, static-site, wintersmith, build-tool, etc.), but none serve as a modern recommended scaffold for new users. The examples are minimal single-file demonstrations that don't reflect:
- Current recommended project structure (src/, layouts/, public/)
- Using
metalsmith.jsonvs programmatic API - Frontmatter conventions and metadata patterns
- Integrating common plugins (markdown, layouts, permalinks, collections, drafts, sitemaps)
- TypeScript usage (the repo now ships with tsconfig.json and types/index.d.ts)
New users visiting the repo must piece together the API from README, individual plugin repos, and blog posts. This creates friction compared to alternatives like Zola (zola init), Hugo (hugo new site), or 11ty (npm init @11ty/eleventy).
Proposal
Add a self-contained scaffold/ directory or create-metalsmith npm package that generates:
my-site/
├── metalsmith.js # programmatic config (preferred API)
├── package.json
├── src/
│ ├── index.md # sample page with frontmatter
│ └── about.md
├── layouts/
│ ├── default.hbs # example layout (Handlebars or Nunjucks)
│ └── partials/
│ ├── header.hbs
│ └── footer.hbs
├── public/ # build output (gitignored)
└── .gitignoreThis would:
- Give new users a working site in 3 commands
- Demonstrate current best practices (async/await, built-in plugins)
- Make Metalsmith competitive with getting-started UX of other SSGs
- Serve as a reference for correct TypeScript types usage
Related
- #303 (async/await refactoring) — scaffold should be async-native
- #392 (metalsmith.on("built")) — scaffold can demonstrate event hooks
- #402 (config ambiguity) — concrete structure eliminates ambiguity
Source: metalsmith/metalsmith