aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/org-ssg.toml19
-rw-r--r--content/templates/base.html8
-rw-r--r--content/templates/feed.xml7
-rw-r--r--content/templates/garden.html2
-rw-r--r--content/templates/tags.html15
5 files changed, 38 insertions, 13 deletions
diff --git a/content/org-ssg.toml b/content/org-ssg.toml
index 148513b..7cac59d 100644
--- a/content/org-ssg.toml
+++ b/content/org-ssg.toml
@@ -45,6 +45,16 @@ dir = "templates"
match = "blog"
template = "post.html"
+# The live site invites replies on garden notes and /now/ too, but not on /uses/,
+# /tips/ or /salary/.
+[[pages]]
+match = "garden"
+template = "post.html"
+
+[[pages]]
+match = "now"
+template = "post.html"
+
[highlight]
theme = "InspiredGitHub"
@@ -53,7 +63,10 @@ theme = "InspiredGitHub"
# which is what the current site does too.
heading_offset = 1
toc = true
-section_numbers = false
+# On, because the live site has numbered headings — inherited from Emacs' default rather
+# than chosen, but changing it is a design decision to make deliberately rather than a
+# side effect of switching generators. One line to flip when you want to.
+section_numbers = true
# --- Generated pages -------------------------------------------------------------
# These have no source .org file. weblorg produces the equivalents today through its
@@ -116,3 +129,7 @@ template = "feed.xml"
title = "cleberg.net"
sort = "date"
order = "desc"
+# Whole posts, not excerpts. The live feed carries full content, and a subscriber handed
+# excerpts instead would notice. Costs a render of every listed post whenever the feed is
+# rebuilt, which is the trade this is worth making for.
+include_content = true
diff --git a/content/templates/base.html b/content/templates/base.html
index e391e8d..090cbea 100644
--- a/content/templates/base.html
+++ b/content/templates/base.html
@@ -8,12 +8,14 @@
Available here: page (.title .url .source .date .date_iso .tags .excerpt .toc
.keywords), site, nav, root, stylesheet. See the org-ssg guide on Templates. #}
{#- The table of contents, in the shape Emacs exports it. `page.toc` is a tree of
- {title, anchor, level, children}, and it is empty when the page has no headings or
- says `#+OPTIONS: toc:nil` — so pages that opt out simply render nothing here. #}
+ {title, anchor, level, number, children}, and it is empty when the page has no
+ headings or says `#+OPTIONS: toc:nil` — so pages that opt out render nothing here.
+ The number is printed because [html] section_numbers is on; drop it if you turn
+ numbering off, or the contents will number what the headings do not. #}
{%- macro toc_list(entries) -%}
<ul>
{%- for e in entries %}
-<li><a href="#{{ e.anchor }}">{{ e.title }}</a>
+<li><a href="#{{ e.anchor }}">{{ e.number }} {{ e.title }}</a>
{%- if e.children %}{{ toc_list(e.children) }}{% endif %}</li>
{%- endfor %}
</ul>
diff --git a/content/templates/feed.xml b/content/templates/feed.xml
index 0319910..fa761b8 100644
--- a/content/templates/feed.xml
+++ b/content/templates/feed.xml
@@ -3,9 +3,8 @@
from the site that served it, so every URL here is absolute — which is what
`| absolute` needs [site] base_url for.
- One difference from weblorg: <description> carries each post's excerpt rather than its
- full HTML. org-ssg gives a collection template each entry's metadata, not its rendered
- body. #}
+ <description> carries each post's full rendered HTML, as weblorg's feed does — the
+ collection sets `include_content` to ask for it. #}
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
@@ -29,7 +28,7 @@
{%- for tag in post.tags %}
<category>{{ tag }}</category>
{%- endfor %}
- <description>{{ post.excerpt }}</description>
+ <description><![CDATA[{{ post.content | safe }}]]></description>
</item>
{%- endfor %}
</channel>
diff --git a/content/templates/garden.html b/content/templates/garden.html
index 9d21248..dc669a2 100644
--- a/content/templates/garden.html
+++ b/content/templates/garden.html
@@ -6,7 +6,7 @@
<p>Notes in various states of growth. Some are stubs, some are developed. Browse
around.</p>
<section>
-<h2>&#127795; The Growth Stages</h2>
+<h2>&#129716; The Growth Stages</h2>
<p>Instead of dates, these metadata labels show how mature a page is:</p>
<span><strong>&#127793; Seedlings:</strong> Rough notes, raw ideas, or "half-baked"
thoughts.</span><br>
diff --git a/content/templates/tags.html b/content/templates/tags.html
index 094d1f6..5240b27 100644
--- a/content/templates/tags.html
+++ b/content/templates/tags.html
@@ -1,12 +1,19 @@
-{# The tag index at /tags/, mirroring theme/templates/tags.html. Receives `groups` —
- every tag with its count — rather than `pages`, because it lists tags and not posts. #}
+{# The tag index at /tags/. Receives `groups` — every tag with its count — rather than
+ `pages`, because it lists tags and not posts.
+
+ This deliberately differs in shape from the live weblorg page, which is one page with
+ every post inlined under an `#anchor` per tag. Here each tag is its own page, so a tag
+ has a URL worth linking to and the index stays short. The `id` on each entry keeps the
+ old `/tags/#audit` links landing in the right place — they scroll to the tag and its
+ link, rather than 404ing or dumping the reader at the top of a long page. #}
{% extends "base.html" %}
{% block main %}
<h1>{{ page.title }}</h1>
<p>Browse posts by topic.</p>
-<ul>
+<ul class="tag-toc">
{%- for tag in groups %}
-<li><a href="{{ root }}{{ tag.url }}">{{ tag.name }}</a> ({{ tag.count }})</li>
+<li id="{{ tag.slug }}"><a href="{{ root }}{{ tag.url }}">{{ tag.name }}</a>
+<span class="tag-count">({{ tag.count }})</span></li>
{%- endfor %}
</ul>
{% endblock %}