Sunset
Golden hour at the beach
🔂name
Increments the counter named name and substitutes the new value.
Each occurrence adds one, so five blocks get 1, 2, 3, 4, 5.
🔂_name
Reads the current value of counter name without incrementing.
Use this when multiple tokens in one block need the same counter value —
for example, 📊title🔂num increments (giving
📊title1), and 📊desc🔂_num peeks (giving
📊desc1, not 📊desc2).
Each counter name is tracked independently. This page uses two:
🔂cat numbers the category headers, and
🔂num numbers the photo cards — they count separately.
Here 🔂cat reaches 3 while 🔂num
reaches 5; they never interfere with each other.
This page includes 🪪category-header blocks and
🪪photo-card blocks interleaved — three categories
(cat 1→2→3) containing five photos (num 1→2→3→4→5).
Golden hour at the beach
Pacific coast waves
Misty morning in the woods
Snow-capped peaks at dawn
Sand dunes at midday
# blocks/category-header.html — uses 🔂cat <header class="category-header"> <h3>Category 🔂cat: 📊cat🔂_cat</h3> </header> # blocks/photo-card.html — uses 🔂num (independent from 🔂cat) <article class="photo-card"> <h2>📊title🔂num</h2> <p>📊desc🔂_num</p> </article> # data/gallery.toml [_] title1 = "Sunset" desc1 = "Golden hour at the beach" title2 = "Ocean" desc2 = "Pacific coast waves" title3 = "Forest" desc3 = "Misty morning in the woods" title4 = "Mountain" desc4 = "Snow-capped peaks at dawn" title5 = "Desert" desc5 = "Sand dunes at midday" cat1 = "Landscapes" cat2 = "Nature" cat3 = "Terrain"
The counter step runs once and handles all counter names — both 🔂cat
and 🔂num are resolved by the same step, each tracking independently.