Theming engine (notes)
Separation of concerns
- Theme is a folder with: configuration file, template files, asset files.
- Renderer provides data and stays presentationâlayer agnostic.
Injection model
- Option A: Theme exposes hooks for renderer to inject (e.g., head/body, Svelte embeds).
- Option B (preferred): Themes are unaware; renderer injects code via simple HTML parsing.
Data model cleanup
- Cleaner content tree structure from the structurer; renderer renders through templates.
Templates
- Simplest case: single template for all pages.
- Potential support for layouts and partials.
Helpers
- Consider helpers for index tables, but separation may be cleaner if templates handle this.
Defaults & inheritance
- Chalk could ship default templates that a theme inherits (Hugoâstyle).
Template engine options
- Preference for Jinjaâlike ergonomics (Python background).
- Explore Liquid or Nunjucks; question if a “jinja.js” exists.