aboutsummaryrefslogtreecommitdiff
path: root/content/templates
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-08-11 13:51:10 -0500
committerChristian Cleberg <[email protected]>2026-08-11 13:51:10 -0500
commit30685edfb32432635605d014588c5c8d7591fd3b (patch)
tree85de76827a35e23a79a1e8a509f9b112527dfdc1 /content/templates
parentad2d5934148e17efa20e77879ddd45950209852b (diff)
downloadcleberg.net-30685edfb32432635605d014588c5c8d7591fd3b.tar.gz
cleberg.net-30685edfb32432635605d014588c5c8d7591fd3b.tar.bz2
cleberg.net-30685edfb32432635605d014588c5c8d7591fd3b.zip
Route blog posts through post.html
The reply-by-email and Bubbles lines were emitted from base.html behind a test on the page's URL, because org-ssg had no way for a page to pick a layout. It does now, so they live in a post.html that extends the shared one — the same split weblorg has between theme/templates/base.html and post.html — selected by a [[pages]] rule for blog/. All 169 posts carry the footer; /blog/ itself does not, being a generated listing rather than a post.
Diffstat (limited to 'content/templates')
-rw-r--r--content/templates/base.html8
-rw-r--r--content/templates/post.html11
2 files changed, 13 insertions, 6 deletions
diff --git a/content/templates/base.html b/content/templates/base.html
index c012e65..6345700 100644
--- a/content/templates/base.html
+++ b/content/templates/base.html
@@ -57,13 +57,9 @@
{%- if page.tags %}
<p>{% for tag in page.tags %}<a href="{{ root }}tags/{{ tag }}.html">#{{ tag }}</a> {% endfor %}</p>
{%- endif %}
+{#- Blog posts add a reply footer inside this block; see post.html, which the
+ [[pages]] rule in org-ssg.toml selects for everything under blog/. #}
<div>{% block content %}{{ body | safe }}{% endblock %}</div>
-{#- Blog posts carry a reply footer; other pages do not. org-ssg has no per-page
- template selection, so the page's own URL is what tells them apart. #}
-{%- if page.url is startingwith("blog/") %}
-<div><a href="mailto:[email protected]">Reply via email &rarr;</a></div>
-<div><i>...or, comment on this post on <a href="https://bubbles.town/source/cleberg.net">Bubbles</a>!</i></div>
-{%- endif %}
</article>
{% endblock %}
</main>
diff --git a/content/templates/post.html b/content/templates/post.html
new file mode 100644
index 0000000..e35ad64
--- /dev/null
+++ b/content/templates/post.html
@@ -0,0 +1,11 @@
+{# A blog post, mirroring theme/templates/post.html. Everything but the reply footer is
+ the shared layout, so this extends it rather than restating it.
+
+ Selected by the [[pages]] rule for blog/ in org-ssg.toml; a post that wants a different
+ layout says so with #+TEMPLATE:. #}
+{% extends "base.html" %}
+{% block content %}
+{{ body | safe }}
+<div><a href="mailto:[email protected]">Reply via email &rarr;</a></div>
+<div><i>...or, comment on this post on <a href="https://bubbles.town/source/cleberg.net">Bubbles</a>!</i></div>
+{% endblock %}