Examples
Example Sites
Super-Simple Includes comes with example sites numbered 1–25 and 99. Each example builds on the previous ones, introducing new concepts progressively from absolute basics to production-ready patterns.
Example Overview
All examples are in the examples/ directory of the repository.
| # | Example | What It Teaches | Live |
|---|---|---|---|
| 1 | copy-only | Minimal config — only required fields, default processing = "copy" | View live |
| 2 | simple-page | First template processing — processing = "page" with plain-text includes | View live |
| 3 | markdown-content | Markdown conversion — type = "markdown" for content files | View live |
| 4 | assets-with-checksums | Checksum verification — options = ["checksum"] and .xxh3 files | View live |
| 5 | content-types | Auto-detection — type = "auto" for mixed-format directories | View live |
| 6 | html-blocks | HTML components — reusable blocks with type = "html" | View live |
| 7 | toml-data | Structured data — TOML files as variable sources | View live |
| 8 | step-order | Step ordering — pipeline sequencing rules and leftovers-okay | View live |
| 9 | inline-content | Inline vs. block includes — options = ["inline"] across all content types | View live |
| 10 | page-specific | Per-page resolution — same token, different content per page | View live |
| 11 | page-templates | Multi-page generation — the template field for file-based page expansion | View live |
| 12 | include-templates | Template rendering for includes — one token expands to many items; TOML and directory sources; inline mode; step ordering | View live |
| 13 | emoji-also | Alias emoji — the also field lets multiple include steps share one emoji so one template works with different data sources | View live |
| 14 | builtin-sources | System integration — datetime, git, environment, metadata, navigation (alphabetical + numeric sort), index; live data on every build | View live |
| 15 | nav-and-index | Navigation and index — prev/next links, position tokens, per-page metadata, auto-generated listings | View live |
| 16 | css-js-templates | CSS/JS templates — no-escape for variable injection; type = "raw" for verbatim content | View live |
| 17 | file-handling | File handling options — checksum, skip-by-checksum, add-dot, strip-extension, dotfiles, preserve with missing-ok, flat copy | View live |
| 18 | basic-blog | Blog with navigation and template-rendered index — template, excerpt, navigation, index with item template | View live |
| 19 | conditional-include | Conditional section — show or hide an HTML block using a gate TOML, fallback, and chain-reaction tokens | View live |
| 20 | infinite-scroll | JavaScript infinite scroll — using navigation data attributes for dynamic UX | View live |
| 21 | external-paths | External content — allow-external-paths with relative paths and fallback | View live |
| 22 | context-field | Context field — static context overrides, root context _, nested destinations | View live |
| 23 | counter-source | Auto-incrementing counters — type = "counter" for repeated blocks with distinct data; comparison with template rendering | View live |
| 24 | combining-tokens | Token composition — key construction and two-pass resolution using step order | View live |
| 25 | nested-sites | Nested processing — independent configuration, include sources, and emoji namespace per section | View live |
| 99 | full-site | Production example — all features working together in a complete site | View live |
Learning Path
Core concepts (examples 1–5)
- Start with example 1 — the absolute minimum config
- Example 2 — add your first template processing
- Example 3 — convert Markdown content to HTML
- Example 4 — verify assets with checksums
- Example 5 — handle mixed content types automatically
Include patterns (examples 6–10)
- Example 6 — build reusable HTML components
- Example 7 — manage variables in TOML
- Example 8 — step ordering: pipeline sequencing rules and
leftovers-okay - Example 9 — control inline vs. block formatting
- Example 10 — per-page content resolution (SSI’s most flexible feature)
Multi-page generation (example 11)
- Example 11 — generate many pages from one template
Template rendering (example 12)
- Example 12 — expand one token into many rendered items using TOML or directory sources
System integration (examples 13–16)
- Example 13 — alias emoji with the
alsofield; reuse one template across different data sources - Example 14 — use datetime, git, environment, and metadata sources; live data on every build
- Example 15 — navigation and index sources: prev/next links, position tokens, per-page metadata, and auto-generated listings
- Example 16 — process CSS and JS as templates; use
type = "raw"for verbatim content - Example 17 — file handling and preserve patterns
Practical sites (examples 18–21)
- Example 18 — a complete blog with navigation, excerpts, and template-rendered index
- Example 19 — conditional section via fallback gate: show or hide a whole HTML block at build time
- Example 20 — JavaScript infinite scroll built entirely from SSI navigation data
- Example 21 — external content access as a plugin system alternative
Advanced composition (examples 22–25)
- Example 22 — advanced context and nested destination organization
- Example 23 — counter source for repeated blocks with distinct data; comparison with template rendering
- Example 24 — token construction and two-pass resolution
- Example 25 — nested processing: independent configuration, include sources, and emoji namespace per section
Full-site (example 99)
- Example 99 — all features together in a production-ready site
Example Structure
Each example contains:
site/— The source files andssi-config.tomlexpected-deploy/— The built outputexpected-deploy-hashes.toml— Hash record of expected output filestest-assertions.toml— Semantic assertions run by the test suiteREADME.md— Explanation of what the example teaches
Using the Examples
Run locally
# Clone the repository
git clone https://codeberg.org/mattdm/super-simple-includes.git
cd super-simple-includes
# Build an example
cd examples/01-copy-only
ssi deploy site/ output/
Copy as a starting point
# Copy an example as your starting point
cp -r examples/10-page-specific/site/ my-new-site/
cd my-new-site/
# Edit files, then:
ssi deploy . ../my-deploy/
Run the test suite
All examples are validated by the integration test suite on every commit:
python3 scripts/run-all-tests.py integration