Commit 713120aac5
Copy SHA
713120aac59fc5f3e8ca2e2b6d9269b34a0f2ee5
parent: 7c114f1212
Verified · cmc
cmc <hello@cleberg.net> · 2026-09-15 23:12 UTC
Add detour series: tag, post convention, index, styling
Special blocks already export as <div class="detour"> around a <dl>, so
this needs no orgo change.
- content/templates/detour.html: series index, holds the rating scale
- content/templates/detour.org: post template (dir is not published)
- content/orgo.toml: /detour/ collection, filtered by tag in the
template because collections select by directory
- theme/static/styles.css: .detour and .detour-list rules
Layout: unified · split
Changed files (4)
content/orgo.toml
+13 −1
@@ -25,7 +25,7 @@ base_url = "https://cleberg.net"
25 25 # listed here gets appended after everything that is — which is why the tags collection
26 26 # below does not set `nav = true`: the live nav has no Tags entry.
27 27 mode = "explicit"
28 pages = [ "blog/index.html" , "garden/index.html" , "salary/index.org" ]
28 pages = [ "blog/index.html" , "garden/index.html" , "detour/index.html" , "salary/index.org" ]
29 29
30 30 [ build ]
31 31 # theme/static/ is the site's static root, published at /. orgo reads it from here
@@ -97,6 +97,18 @@ sort = "date"
97 97 order = "desc"
98 98 nav = true
99 99
100 # The detour series index. `source` is blog rather than a directory of its own, because
101 # these are ordinary blog posts — they belong in the blog index and the feed — and a
102 # collection cannot select by tag. detour.html does that filtering itself.
103 [ [ collections ] ]
104 source = "blog"
105 output = "detour/index.html"
106 template = "detour.html"
107 title = "detour"
108 sort = "date"
109 order = "asc"
110 nav = true
111
100 112 # One page per tag, plus the index the live site already has at /tags/. `source` is empty
101 113 # so it groups across the whole site rather than one section, which is how #+FILETAGS: is
102 114 # used here — tags appear on blog posts and garden notes alike.
content/templates/detour.html
added
+42
@@ -0,0 +1,42 @@
1 {# The detour series index at /detour/.
2
3 Receives every blog post and filters to the ones tagged `detour`, because a
4 collection selects by directory and these posts live in blog/ with everything else —
5 they belong in the blog index and the feed like any other post.
6
7 Number and name come from the title (`detour #001: Name`). Location and rating come
8 from `#+LOCATION:` and `#+RATING:`, which the post also states in its own metadata
9 block; a listing cannot read prose, so the two structured fields are repeated as
10 keywords.
11
12 The rating prints stars and the "N/5" text both. Stars alone would reach a screen
13 reader as a run of unexplained symbols. #}
14 {% extends "base.html" %}
15 {% block main %}
16 < h1 > {{ page.title }}< / h1 >
17 < p > Museums, roadside attractions, public art, and local landmarks worth leaving
18 the highway for. One post per place.< / p >
19
20 < h2 > Rating scale< / h2 >
21 < dl >
22 < dt > ★☆☆☆☆ (1/5)< / dt > < dd > Only if you're already in the parking lot.< / dd >
23 < dt > ★★☆☆☆ (2/5)< / dt > < dd > Worth a stop if it's on your route.< / dd >
24 < dt > ★★★☆☆ (3/5)< / dt > < dd > Worth a short detour, under 30 minutes.< / dd >
25 < dt > ★★★★☆ (4/5)< / dt > < dd > Worth planning an afternoon around.< / dd >
26 < dt > ★★★★★ (5/5)< / dt > < dd > Worth a dedicated road trip.< / dd >
27 < / dl >
28
29 < h2 > The list< / h2 >
30 < ul class = "detour-list" >
31 {%- for entry in pages if "detour" in entry.tags %}
32 < li >
33 < a href = "{{ root }}{{ entry.url }}" > {{ entry.title }}< / a >
34 < span class = "detour-meta" >
35 {%- if entry.keywords.location %}{{ entry.keywords.location }}{% endif %}
36 {%- if entry.keywords.location and entry.keywords.rating %} · {% endif %}
37 {%- if entry.keywords.rating %}{{ "★" * entry.keywords.rating | int }}{{ "☆" * (5 - entry.keywords.rating | int) }} ({{ entry.keywords.rating }}/5){% endif %}
38 < / span >
39 < / li >
40 {%- endfor %}
41 < / ul >
42 {% endblock %}
content/templates/detour.org
added
+29
@@ -0,0 +1,29 @@
1 # Starting point for a detour post. Copy to content/blog/YYYY-MM-DD-detour-NNN-slug.org
2 # and fill in. This directory is not published, so the file is not a page.
3 #
4 # NNN is zero-padded and sequential. #+LOCATION: and #+RATING: are what the series index
5 # at /detour/ reads; the block below is what the reader sees. Keep them in agreement.
6 #
7 # Ratings: 1 only if you're already in the parking lot, 2 worth a stop if it's on your
8 # route, 3 worth a short detour under 30 minutes, 4 worth planning an afternoon around,
9 # 5 worth a dedicated road trip.
10
11 #+date : [YYYY-MM-DD Day 00:00:00]
12 #+title : detour #NNN: NAME
13 #+description :
14 #+slug : detour-NNN-SLUG
15 #+filetags : :detour:
16 #+location : CITY, ST
17 #+rating : N
18
19 #+begin_ detour
20 - Location :: CITY, ST · [[OSM_URL][map]]
21 - Admission :: PRICES (as of YYYY-MM)
22 - Hours :: SUMMARY; check the [[OFFICIAL_URL][official site]]
23 - Visited :: YYYY-MM
24 - Worth the drive :: ★★★★☆ (N/5)
25 #+end_detour
26
27 * Overview
28
29 * Going
theme/static/styles.css
+9
@@ -18,6 +18,15 @@ pre { overflow: auto; white-space: pre; }
18 18 blockquote p { margin : 0 ; margin-bottom : 1 rem ; }
19 19 blockquote p : last-child { margin-bottom : 0 ; }
20 20 code { color : #942192 ; }
21 /* The metadata block on a detour post. currentColor for the rule, so the dark scheme
22 below needs no override. */
23 . detour { border-left : 3 px solid currentColor ; padding : .5 rem 1 rem ; margin : 1 rem 0 2 rem ; font-size : .95 em ; }
24 . detour dl { margin : 0 ; }
25 . detour dt { font-weight : bold ; }
26 . detour dd { margin : 0 0 .4 rem 0 ; }
27 . detour-list { padding-inline-start : 0 ; }
28 . detour-list li { list-style : none ; margin-bottom : .75 rem ; }
29 . detour-meta { display : block ; font-size : .95 em ; }
21 30 /* Blocks are coloured by syntax.css, so this is only the fallback for the tokens it
22 31 leaves unclassified: the highlight theme's own foreground rather than inline code's. */
23 32 pre code { color : #323232 ; }