From a6ee2e0ca79b83b7f6bd4a521777cffdaf2260f2 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Tue, 11 Aug 2026 20:34:02 -0500 Subject: Finish the move off weblorg Remove what the migration left behind, then cut build.py down to the work orgo does not do: 443 lines to 168. - Delete publish.el and theme/templates/, superseded by content/orgo.toml and content/templates/. theme/static/ stays; orgo publishes it as assets. - Drop the tag builder, the org-source copy, and the helpers that only fed them. orgo generates /tags/ and a page per tag from a collection. - Rewrite the README and the migration-era comments that explained the config by pointing at what weblorg used to do. - Serve styles.css as authored. Minifying 1KB of CSS saved 52 bytes over the wire once compressed, which did not pay for a build step and a toolchain dependency. - Stop wiping the output directory. The .orgo-cache.json inside it is what makes a build incremental, and orgo already prunes outputs whose source is gone and re-emits any that are missing. Production keeps .build/ and development gets .build-dev/, because production rewrites image URLs in the output and a shared directory would let one environment reuse pages rendered for the other. An incremental build is byte-identical to a clean one, and the site output is unchanged apart from the /uses/ stack row. --- publish.el | 128 ------------------------------------------------------------- 1 file changed, 128 deletions(-) delete mode 100644 publish.el (limited to 'publish.el') diff --git a/publish.el b/publish.el deleted file mode 100644 index aecdb0f..0000000 --- a/publish.el +++ /dev/null @@ -1,128 +0,0 @@ -;;; -*- lexical-binding: t -*- -(setq debug-on-error t) - -;; Allow for macOS (dev machine) & Linux (GitHub Actions) execution -(defvar site-lisp-base - (expand-file-name "~/.config/emacs/.local/straight/repos")) - -;; Explicitly load packages -(add-to-list 'load-path (expand-file-name "htmlize" site-lisp-base)) -(add-to-list 'load-path (expand-file-name "weblorg" site-lisp-base)) -(add-to-list 'load-path (expand-file-name "templatel" site-lisp-base)) - -(require 'htmlize) -(require 'templatel) -(require 'weblorg) - -;; Set default URL for Weblorg -;; Only works if environment variable ENV=prod -(if (string-equal-ignore-case (or (getenv "ENV") "") "prod") - (setq weblorg-default-url "https://cleberg.net")) - -;; Define site metadata -(weblorg-site - :theme nil - :template-vars '(("site_name" . "cleberg.net") - ("site_owner" . "Christian Cleberg ") - ("site_description" . "Stillness amidst the chaos."))) - -;; Define routes for rendering content - -;; Index page route -(weblorg-route - :name "index" - :input-pattern "content/*.org" - :template "index.html" - :output ".build/index.html" - :url "/") - -;; Blog post route -(weblorg-route - :name "blog" - :input-pattern "content/blog/*.org" - :template "post.html" - :output ".build/blog/{{ slug }}.html" - :url "/blog/{{ slug }}.html") - -;; Blog index page route -(weblorg-route - :name "blog-index" - :input-pattern "content/blog/*.org" - :input-aggregate #'weblorg-input-aggregate-all-desc - :template "blog.html" - :output ".build/blog/index.html" - :url "/blog/") - -;; Garden post route -(weblorg-route - :name "garden" - :input-pattern "content/garden/*.org" - :template "post.html" - :output ".build/garden/{{ slug }}.html" - :url "/garden/{{ slug }}.html") - -;; Garden index page route -(weblorg-route - :name "garden-index" - :input-pattern "content/garden/*.org" - :input-aggregate #'weblorg-input-aggregate-all-desc - :template "garden.html" - :output ".build/garden/index.html" - :url "/garden/") - -;; Page post route -(weblorg-route - :name "pages" - :input-pattern "content/*.org" - :template "page.html" - :output ".build/{{ slug }}.html" - :url "/{{ slug }}.html") - -;; Salary page route -(weblorg-route - :name "salary" - :input-pattern "content/salary/*.org" - :template "page.html" - :output ".build/salary/{{ slug }}.html" - :url "/salary/{{ slug }}.html") - -;; Now page route -(weblorg-route - :name "now" - :input-pattern "content/now/*.org" - :template "post.html" - :output ".build/now/{{ slug }}.html" - :url "/now/{{ slug }}.html") - -;; Uses page route -(weblorg-route - :name "uses" - :input-pattern "content/uses/*.org" - :template "page.html" - :output ".build/uses/{{ slug }}.html" - :url "/uses/{{ slug }}.html") - -;; Tips page route -(weblorg-route - :name "tips" - :input-pattern "content/tips/*.org" - :template "page.html" - :output ".build/tips/{{ slug }}.html" - :url "/tips/{{ slug }}.html") - -;; RSS feed route -(weblorg-route - :name "rss" - :input-pattern "content/blog/*.org" - :input-aggregate #'weblorg-input-aggregate-all-desc - :template "feed.xml" - :output ".build/feed.xml" - :url "/feed.xml") - -;; Copy static assets and output to .build directory -(weblorg-copy-static - :output ".build/{{ file }}" - :url "/{{ file }}") - -;; Export all content using Weblorg engine -(weblorg-export) -- cgit v1.2.3