First template pack
Build a working template pack from scratch.
1. Lay out the directory#
text
1 2 3 4 5 6 7 8 9 10 | |
2. manifest.json#
json
1 2 3 4 5 6 7 8 9 10 11 12 | |
3. base.html#
jinja
1 2 3 4 5 6 7 8 9 10 11 | |
4. blog-post.html#
jinja
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
5. Verify, package, upload#
bash
1 2 3 4 5 6 7 8 9 10 | |
6. View#
text
1 | |
If you don't see your changes, check the delivery service logs — Jinja
errors surface there. The most common gotcha: writing
content.fields.items (Python's dict method!) instead of
content.fields["items"] for bracket-notation access.
What's next#
- Add a
blocksfield type and declareblock_typesin your manifest. - Build template-pack partials (
templates/partials/header.html, etc.) for reuse with{% include %}. - Add a
manifest.json → settingsblock to let site admins toggle behavior without code changes.