aboutsummaryrefslogtreecommitdiff
path: root/content/templates/home.html
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-08-11 02:20:00 -0500
committerChristian Cleberg <[email protected]>2026-08-11 02:20:00 -0500
commit41f1c71b19a786be9d37fe5d78298294f66f55b5 (patch)
tree7c1a049ed0eee6ff609a3251bdb7b9bbaf7de985 /content/templates/home.html
parent8ec9cdfeae71068a8924dd9f61b9cc28c947ec31 (diff)
downloadcleberg.net-41f1c71b19a786be9d37fe5d78298294f66f55b5.tar.gz
cleberg.net-41f1c71b19a786be9d37fe5d78298294f66f55b5.tar.bz2
cleberg.net-41f1c71b19a786be9d37fe5d78298294f66f55b5.zip
Add an org-ssg build alongside the weblorg one
Builds the same site with org-ssg instead of weblorg, reproducing all 182 URLs the current .build output has, plus 13 per-tag pages it does not. org-ssg serve content -o /tmp/preview # write, with live reload org-ssg build content -o _site --strict # build, failing on broken links content/ is the source because it is the URL root: content/blog/post.org publishes at /blog/post.html. Pointing at the repository root instead would prefix every URL with /content/ and copy build.py, publish.el and LICENSE into the site as assets. Added: - content/org-ssg.toml — site metadata, an explicit nav, and four generated pages: the home page, the blog index, the garden index, and tag pages with an index. URLs come from #+SLUG:, which is why 2018-11-28-aes-encryption.org still publishes at /blog/aes-encryption.html. - content/templates/ — base, home, list and tags. Plain layouts using the .post-list classes styles.css already defines, not a port of theme/templates/, which are templatel and a different language. - content/styles.css — a verbatim copy of theme/static/styles.css, because org-ssg publishes assets from inside its source directory. `diff` between the two should stay empty; consolidate them if this migration goes further. Removed content/index.org. It held only #+title and #+description, both now [site] settings, and a generated home page cannot share a URL with an authored one — org-ssg fails that build rather than picking a winner. Restore with `git checkout content/index.org`, but then the home collection needs a different output. Nothing in the weblorg setup changed. publish.el, theme/ and build.py still work as before, so both builds coexist until one is chosen. Known difference: the nav renders Home, Salary, Blog, Garden, Tags — explicit source pages come before generated ones, where the live site orders Salary last.
Diffstat (limited to 'content/templates/home.html')
-rw-r--r--content/templates/home.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/content/templates/home.html b/content/templates/home.html
new file mode 100644
index 0000000..be5a0e6
--- /dev/null
+++ b/content/templates/home.html
@@ -0,0 +1,44 @@
+{# The home page: authored prose plus the most recent posts.
+
+ A generated page, so it has no source .org file — `pages` holds the blog collection's
+ entries, newest first, and the prose lives here. This mirrors what weblorg's
+ theme/templates/index.html does today. #}
+{% extends "base.html" %}
+{% block content %}
+<section>
+<p>[ <a href="https://krz.sh">krz</a> &middot; <a href="https://audit-labs.dev">audit labs</a> ]</p>
+<p>Privacy &middot; Self-Hosting &middot; iOS</p>
+<p>I build tools, write about systems, and run my own infrastructure. Focused on privacy,
+user control, and long-term utility.</p>
+<p><a href="{{ root }}uses/index.html">Uses</a> &middot; <a href="{{ root }}now/index.html">Now</a></p>
+</section>
+
+<section>
+<h2>Recent Posts</h2>
+<p>Things I&rsquo;ve written recently.</p>
+<ul class="post-list">
+{%- for entry in pages %}
+{%- if loop.index <= 3 %}
+<li class="post-list-item">
+{%- if entry.date_iso %}<time datetime="{{ entry.date_iso }}">{{ entry.date_iso }}</time>{% endif %}
+<a href="{{ root }}{{ entry.url }}">{{ entry.title }}</a>
+</li>
+{%- endif %}
+{%- endfor %}
+</ul>
+<p><a href="{{ root }}blog/index.html">All Posts &rarr;</a></p>
+</section>
+
+<section>
+<h2>Elsewhere</h2>
+<p>Places to find me online.</p>
+<ul>
+<li>cgit (primary): <a href="https://git.krz.sh">~cmc</a></li>
+<li>GitHub (mirror): <a href="https://github.com/ccleberg">@ccleberg</a></li>
+<li>Email: <a href="mailto:[email protected]">[email protected]</a></li>
+<li>Lemmy: <a href="https://r.nf/u/cmc">@cmc</a></li>
+<li>Mastodon: <a href="https://c.im/@cmc">@cmc</a></li>
+<li>Pixelfed: <a href="https://gram.social/cmc">@cmc</a></li>
+</ul>
+</section>
+{% endblock %}