This commit is contained in:
2026-03-20 23:53:41 +00:00
parent 20f770ad59
commit 623727e71c
25 changed files with 2262 additions and 2765 deletions

3
.stignore Normal file
View File

@@ -0,0 +1,3 @@
output
.packages
.org-timestamps

View File

@@ -6,51 +6,51 @@ See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
* 2026
** March 2026
- [[file:2026/03-march/setting-a-wird-tracker-19-03.org][Setting a Wird Tracker]] @@html:<span class="post-date">19-03-2026 13:15</span>@@ @@html:<a href="/tags/life.html"> <span class="post-tag">life</span> </a>@@
- [[file:2026/03-march/fixing-the-dag-18-03.org][DAG fixes]] @@html:<span class="post-date">18-03-2026 15:01</span>@@ @@html:<a href="/tags/life.html"> <span class="post-tag">life</span> </a>@@
- [[file:2026/03-march/feeling-sleepy.org][Feeling extremely sleepy]] @@html:<span class="post-date">16-03-2026 16:18</span>@@ @@html:<a href="/tags/life.html"> <span class="post-tag">life</span> </a>@@
- [[file:2026/03-march/oversleeping-16-03.org][Oversleeping and missing a meeting...]] @@html:<span class="post-date">16-03-2026 11:21</span>@@ @@html:<a href="/tags/life.html"> <span class="post-tag">life</span> </a>@@
- [[file:2026/03-march/15-03-week-review.org][[15-03-2026] - Weekly Review]] @@html:<span class="post-date">15-03-2026 12:00</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/03-march/08-03-week-review.org][[08-03-2026] - Weekly Review]] @@html:<span class="post-date">08-03-2026 12:00</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/03-march/01-03-week-review.org][[01-03-2026] - Weekly Review]] @@html:<span class="post-date">01-03-2026 12:00</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/03-march/setting-a-wird-tracker-19-03.org][Setting a Wird Tracker]] @@html:<span class="post-date">19-03-2026 13:15</span>@@ @@html:<a href="/tags/life.html"><span class="post-tag">life</span></a>@@
- [[file:2026/03-march/fixing-the-dag-18-03.org][DAG fixes]] @@html:<span class="post-date">18-03-2026 15:01</span>@@ @@html:<a href="/tags/life.html"><span class="post-tag">life</span></a>@@
- [[file:2026/03-march/feeling-sleepy.org][Feeling extremely sleepy]] @@html:<span class="post-date">16-03-2026 16:18</span>@@ @@html:<a href="/tags/life.html"><span class="post-tag">life</span></a>@@
- [[file:2026/03-march/oversleeping-16-03.org][Oversleeping and missing a meeting...]] @@html:<span class="post-date">16-03-2026 11:21</span>@@ @@html:<a href="/tags/life.html"><span class="post-tag">life</span></a>@@
- [[file:2026/03-march/15-03-week-review.org][[15-03-2026] - Weekly Review]] @@html:<span class="post-date">15-03-2026 12:00</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2026/03-march/08-03-week-review.org][[08-03-2026] - Weekly Review]] @@html:<span class="post-date">08-03-2026 12:00</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2026/03-march/01-03-week-review.org][[01-03-2026] - Weekly Review]] @@html:<span class="post-date">01-03-2026 12:00</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
** February 2026
- [[file:2026/02-february/27-02-26.org][Journeys rambles again...]] @@html:<span class="post-date">27-02-2026 17:12</span>@@ @@html:<a href="/tags/life.html"> <span class="post-tag">life</span> </a>@@
- [[file:2026/02-february/26-02-26.org][Starting the Journeys Upgrade]] @@html:<span class="post-date">26-02-2026 17:32</span>@@ @@html:<a href="/tags/life.html"> <span class="post-tag">life</span> </a>@@
- [[file:2026/02-february/24-02-26.org][Integration tests failing (sob)]] @@html:<span class="post-date">24-02-2026 16:55</span>@@ @@html:<a href="/tags/life.html"> <span class="post-tag">life</span> </a>@@
- [[file:2026/02-february/22-02-week-review.org][[22-02-2026] - Weekly Review]] @@html:<span class="post-date">22-02-2026 12:00</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/02-february/15-02-week-review.org][[15-02-2026] - Weekly Review]] @@html:<span class="post-date">15-02-2026 12:00</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/02-february/08-02-week-review.org][[08-02-2026] - Weekly Review]] @@html:<span class="post-date">08-02-2026 12:00</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/02-february/third-meeting.org][Third Meeting with lima :)]] @@html:<span class="post-date">01-02-2026 12:00</span>@@ @@html:<a href="/tags/life.html"> <span class="post-tag">life</span> </a>@@
- [[file:2026/02-february/01-02-week-review.org][[01-02-2026] - Weekly Review]] @@html:<span class="post-date">01-02-2026 12:00</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/02-february/27-02-26.org][Journeys rambles again...]] @@html:<span class="post-date">27-02-2026 17:12</span>@@ @@html:<a href="/tags/life.html"><span class="post-tag">life</span></a>@@
- [[file:2026/02-february/26-02-26.org][Starting the Journeys Upgrade]] @@html:<span class="post-date">26-02-2026 17:32</span>@@ @@html:<a href="/tags/life.html"><span class="post-tag">life</span></a>@@
- [[file:2026/02-february/24-02-26.org][Integration tests failing (sob)]] @@html:<span class="post-date">24-02-2026 16:55</span>@@ @@html:<a href="/tags/life.html"><span class="post-tag">life</span></a>@@
- [[file:2026/02-february/22-02-week-review.org][[22-02-2026] - Weekly Review]] @@html:<span class="post-date">22-02-2026 12:00</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2026/02-february/15-02-week-review.org][[15-02-2026] - Weekly Review]] @@html:<span class="post-date">15-02-2026 12:00</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2026/02-february/08-02-week-review.org][[08-02-2026] - Weekly Review]] @@html:<span class="post-date">08-02-2026 12:00</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2026/02-february/third-meeting.org][Third Meeting with lima :)]] @@html:<span class="post-date">01-02-2026 12:00</span>@@ @@html:<a href="/tags/life.html"><span class="post-tag">life</span></a>@@
- [[file:2026/02-february/01-02-week-review.org][[01-02-2026] - Weekly Review]] @@html:<span class="post-date">01-02-2026 12:00</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
** January 2026
- [[file:2026/01-january/25-01-week-review.org][[25-01-2026] - Weekly Review]] @@html:<span class="post-date">25-01-2026 12:00</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/01-january/18-01-week-review.org][[18-01-2026] - Weekly Review]] @@html:<span class="post-date">18-01-2026 12:12</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/01-january/11-01-week-review.org][[11-01-2026] - Weekly Review]] @@html:<span class="post-date">11-01-2026 12:12</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/01-january/04-01-week-review.org][[04-01-2026] - Weekly Review]] @@html:<span class="post-date">04-01-2026 12:12</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2026/01-january/25-01-week-review.org][[25-01-2026] - Weekly Review]] @@html:<span class="post-date">25-01-2026 12:00</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2026/01-january/18-01-week-review.org][[18-01-2026] - Weekly Review]] @@html:<span class="post-date">18-01-2026 12:12</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2026/01-january/11-01-week-review.org][[11-01-2026] - Weekly Review]] @@html:<span class="post-date">11-01-2026 12:12</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2026/01-january/04-01-week-review.org][[04-01-2026] - Weekly Review]] @@html:<span class="post-date">04-01-2026 12:12</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
* 2025
** December 2025
- [[file:2025/12-december/28-12-week-review.org][[28-12-2025] - Weekly Review]] @@html:<span class="post-date">28-12-2025 12:12</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2025/12-december/21-12-week-review.org][[21-12-2025] - Weekly Review]] @@html:<span class="post-date">21-12-2025 12:12</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2025/12-december/14-12-week-review.org][[14-12-2025] - Weekly Review]] @@html:<span class="post-date">09-12-2025 12:12</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2025/12-december/07-12-week-review.org][[07-12-2025] - Weekly Review]] @@html:<span class="post-date">07-12-2025 20:34</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2025/12-december/28-12-week-review.org][[28-12-2025] - Weekly Review]] @@html:<span class="post-date">28-12-2025 12:12</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2025/12-december/21-12-week-review.org][[21-12-2025] - Weekly Review]] @@html:<span class="post-date">21-12-2025 12:12</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2025/12-december/14-12-week-review.org][[14-12-2025] - Weekly Review]] @@html:<span class="post-date">09-12-2025 12:12</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2025/12-december/07-12-week-review.org][[07-12-2025] - Weekly Review]] @@html:<span class="post-date">07-12-2025 20:34</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
** November 2025
- [[file:2025/11-november/30-11-week-review.org][[30-11-2025] - Weekly Review]] @@html:<span class="post-date">30-11-2025 17:09</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2025/11-november/23-11-week-review.org][[23-11-2025] - Weekly Review]] @@html:<span class="post-date">17-11-2025 18:05</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2025/11-november/16-11-week-review.org][[16-11-2025] - Weekly Review]] @@html:<span class="post-date">10-11-2025 17:44</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2025/11-november/09-11-week-review.org][[09-11-2025] - Weekly Review]] @@html:<span class="post-date">09-11-2025 20:08</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:publish-pages.org][How to publish pages using Org Publish]] @@html:<span class="post-date">08-11-2025 10:57</span>@@ @@html:<a href="/tags/website.html"> <span class="post-tag">website</span> </a>@@
- [[file:2025/11-november/02-11-week-review.org][[02-11-2025] - Weekly Review]] @@html:<span class="post-date">02-11-2025 00:00</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2025/11-november/30-11-week-review.org][[30-11-2025] - Weekly Review]] @@html:<span class="post-date">30-11-2025 17:09</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2025/11-november/23-11-week-review.org][[23-11-2025] - Weekly Review]] @@html:<span class="post-date">17-11-2025 18:05</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2025/11-november/16-11-week-review.org][[16-11-2025] - Weekly Review]] @@html:<span class="post-date">10-11-2025 17:44</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2025/11-november/09-11-week-review.org][[09-11-2025] - Weekly Review]] @@html:<span class="post-date">09-11-2025 20:08</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:publish-pages.org][How to publish pages using Org Publish]] @@html:<span class="post-date">08-11-2025 10:57</span>@@ @@html:<a href="/tags/website.html"><span class="post-tag">website</span></a>@@
- [[file:2025/11-november/02-11-week-review.org][[02-11-2025] - Weekly Review]] @@html:<span class="post-date">02-11-2025 00:00</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
** August 2025
- [[file:2025/08-august/third-time.org][Third Time]] @@html:<span class="post-date">28-08-2025 17:08</span>@@ @@html:<a href="/tags/insights.html"> <span class="post-tag">insights</span> </a>@@
- [[file:2025/08-august/benefits-of-reading.org][Benefits of Reading]] @@html:<span class="post-date">14-08-2025 23:36</span>@@ @@html:<a href="/tags/reading.html"> <span class="post-tag">reading</span> </a>@@ @@html:<a href="/tags/insights.html"> <span class="post-tag">insights</span> </a>@@
- [[file:2025/08-august/hilberts.hotel.org][Hilbert's Hotel]] @@html:<span class="post-date">11-08-2025 18:39</span>@@ @@html:<a href="/tags/maths.html"> <span class="post-tag">maths</span> </a>@@ @@html:<a href="/tags/insights.html"> <span class="post-tag">insights</span> </a>@@
- [[file:2025/08-august/spending-the-whole-day-on-this-website.org][09-08-2025: Website Changes]] @@html:<span class="post-date">09-08-2025 00:00</span>@@ @@html:<a href="/tags/emacs.html"> <span class="post-tag">emacs</span> </a>@@ @@html:<a href="/tags/website.html"> <span class="post-tag">website</span> </a>@@
- [[file:2025/08-august/wacom-with-arch.org][Wacom With Arch]] @@html:<span class="post-date">08-08-2025 00:00</span>@@ @@html:<a href="/tags/insights.html"> <span class="post-tag">insights</span> </a>@@
- [[file:2025/08-august/what-do-i-want-to-do-with-emacs.org][What Do I Want To Do With Emacs]] @@html:<span class="post-date">08-08-2025 00:00</span>@@ @@html:<a href="/tags/emacs.html"> <span class="post-tag">emacs</span> </a>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@
- [[file:2025/08-august/zettelkasten.org][Zettelkasten Method]] @@html:<span class="post-date">07-08-2025 00:00</span>@@ @@html:<a href="/tags/education.html"> <span class="post-tag">education</span> </a>@@
- [[file:blogs-intro.org][Blogs Introduction]] @@html:<span class="post-date">06-08-2025 00:00</span>@@ @@html:<a href="/tags/introduction.html"> <span class="post-tag">introduction</span> </a>@@
- [[file:2025/08-august/third-time.org][Third Time]] @@html:<span class="post-date">28-08-2025 17:08</span>@@ @@html:<a href="/tags/insights.html"><span class="post-tag">insights</span></a>@@
- [[file:2025/08-august/benefits-of-reading.org][Benefits of Reading]] @@html:<span class="post-date">14-08-2025 23:36</span>@@ @@html:<a href="/tags/reading.html"><span class="post-tag">reading</span></a>@@ @@html:<a href="/tags/insights.html"><span class="post-tag">insights</span></a>@@
- [[file:2025/08-august/hilberts.hotel.org][Hilbert's Hotel]] @@html:<span class="post-date">11-08-2025 18:39</span>@@ @@html:<a href="/tags/maths.html"><span class="post-tag">maths</span></a>@@ @@html:<a href="/tags/insights.html"><span class="post-tag">insights</span></a>@@
- [[file:2025/08-august/spending-the-whole-day-on-this-website.org][09-08-2025: Website Changes]] @@html:<span class="post-date">09-08-2025 00:00</span>@@ @@html:<a href="/tags/emacs.html"><span class="post-tag">emacs</span></a>@@ @@html:<a href="/tags/website.html"><span class="post-tag">website</span></a>@@
- [[file:2025/08-august/wacom-with-arch.org][Wacom With Arch]] @@html:<span class="post-date">08-08-2025 00:00</span>@@ @@html:<a href="/tags/insights.html"><span class="post-tag">insights</span></a>@@
- [[file:2025/08-august/what-do-i-want-to-do-with-emacs.org][What Do I Want To Do With Emacs]] @@html:<span class="post-date">08-08-2025 00:00</span>@@ @@html:<a href="/tags/emacs.html"><span class="post-tag">emacs</span></a>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@
- [[file:2025/08-august/zettelkasten.org][Zettelkasten Method]] @@html:<span class="post-date">07-08-2025 00:00</span>@@ @@html:<a href="/tags/education.html"><span class="post-tag">education</span></a>@@
- [[file:blogs-intro.org][Blogs Introduction]] @@html:<span class="post-date">06-08-2025 00:00</span>@@ @@html:<a href="/tags/introduction.html"><span class="post-tag">introduction</span></a>@@

View File

@@ -4,4 +4,4 @@
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
* Book Notes:
- [[file:clean-code/clean-code-notes.org][Clean Code Notes]] @@html:<span class="post-date">10-08-2025 19:45</span>@@ @@html:<a href="/tags/books.html"> <span class="post-tag">books</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:clean-code/clean-code-notes.org][Clean Code Notes]] @@html:<span class="post-date">10-08-2025 19:45</span>@@ @@html:<a href="/tags/books.html"><span class="post-tag">books</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@

262
build-site-tests.el Normal file
View File

@@ -0,0 +1,262 @@
;;; build-site-tests.el --- ERT unit tests for build-site.el -*- lexical-binding: t; -*-
;; Run with:
;; emacs -Q --batch -l build-site.el -l build-site-tests.el -f ert-run-tests-batch-and-exit
;; Or interactively:
;; M-x load-file RET build-site-tests.el RET
;; M-x ert RET t RET
;;; Code:
(require 'ert)
(require 'org)
;; ── Helpers ──────────────────────────────────────────────────────────────────
(defmacro with-temp-org-file (content &rest body)
"Create a temporary .org file containing CONTENT, run BODY with `temp-file' bound."
(declare (indent 1))
`(let ((temp-file (make-temp-file "build-site-test-" nil ".org")))
(unwind-protect
(progn
(with-temp-file temp-file (insert ,content))
,@body)
(delete-file temp-file))))
;; ── site-path ────────────────────────────────────────────────────────────────
(ert-deftest test/site-path-expands-relative ()
"site-path should expand a relative path against site-root."
;; We can't call site-path directly without build-site loaded, so we test
;; the same logic inline.
(let* ((site-root "/tmp/mysite/")
(result (expand-file-name "output" site-root)))
(should (string= result "/tmp/mysite/output"))))
(ert-deftest test/site-path-handles-empty-string ()
"site-path with \"\" returns the site-root without a trailing slash.
`expand-file-name' normalises the result, dropping the trailing slash."
(let* ((site-root "/tmp/mysite/")
(result (expand-file-name "" site-root)))
;; expand-file-name strips the trailing slash, giving "/tmp/mysite"
(should (string= result "/tmp/mysite"))))
;; ── z/comments-file-p ────────────────────────────────────────────────────────
(ert-deftest test/comments-file-p-returns-true-for-t ()
"Files with #+COMMENTS: t should be detected."
(with-temp-org-file "#+TITLE: Test\n#+COMMENTS: t\n\nBody.\n"
(should (z/comments-file-p temp-file))))
(ert-deftest test/comments-file-p-case-insensitive ()
"#+COMMENTS: T (uppercase) should still match."
(with-temp-org-file "#+TITLE: Test\n#+COMMENTS: T\n\nBody.\n"
(should (z/comments-file-p temp-file))))
(ert-deftest test/comments-file-p-returns-nil-for-false ()
"Files with #+COMMENTS: nil should return nil."
(with-temp-org-file "#+TITLE: Test\n#+COMMENTS: nil\n\nBody.\n"
(should-not (z/comments-file-p temp-file))))
(ert-deftest test/comments-file-p-returns-nil-when-keyword-absent ()
"Files without #+COMMENTS keyword should return nil."
(with-temp-org-file "#+TITLE: Test\n\nBody.\n"
(should-not (z/comments-file-p temp-file))))
(ert-deftest test/comments-file-p-returns-nil-for-nonexistent-file ()
"Non-existent files should return nil, not signal an error."
(should-not (z/comments-file-p "/tmp/does-not-exist-ever.org")))
(ert-deftest test/comments-file-p-tolerates-whitespace ()
"#+COMMENTS: with surrounding spaces around 't' should match."
(with-temp-org-file "#+TITLE: Test\n#+COMMENTS: t \n\nBody.\n"
(should (z/comments-file-p temp-file))))
;; ── z/comments-file-slug ─────────────────────────────────────────────────────
(ert-deftest test/comments-file-slug-uses-slug-keyword ()
"Should return the #+SLUG: value when present."
(with-temp-org-file "#+TITLE: Test\n#+SLUG: my-cool-post\n\nBody.\n"
(should (string= "my-cool-post" (z/comments-file-slug temp-file)))))
(ert-deftest test/comments-file-slug-falls-back-to-filename ()
"Should fall back to the file-name-base when #+SLUG is absent."
(with-temp-org-file "#+TITLE: Test\n\nBody.\n"
(should (string= (file-name-base temp-file)
(z/comments-file-slug temp-file)))))
(ert-deftest test/comments-file-slug-ignores-blank-slug ()
"A #+SLUG: with only whitespace should fall back to filename."
(with-temp-org-file "#+TITLE: Test\n#+SLUG: \n\nBody.\n"
(should (string= (file-name-base temp-file)
(z/comments-file-slug temp-file)))))
;; ── z/org-html-insert-comments-into-body ─────────────────────────────────────
(ert-deftest test/insert-comments-adds-section-when-enabled ()
"Should append a <section id=\"comments\"> block when comments are on."
(with-temp-org-file "#+TITLE: Test\n#+COMMENTS: t\n#+SLUG: my-slug\n\nBody.\n"
(let* ((info (list :input-file temp-file))
(result (z/org-html-insert-comments-into-body "<div>body</div>" 'html info)))
(should (string-match-p "id=\"comments\"" result))
(should (string-match-p "data-slug=\"my-slug\"" result))
(should (string-match-p "<div>body</div>" result)))))
(ert-deftest test/insert-comments-leaves-body-unchanged-when-disabled ()
"Should return body unchanged when #+COMMENTS is absent."
(with-temp-org-file "#+TITLE: Test\n\nBody.\n"
(let* ((info (list :input-file temp-file))
(result (z/org-html-insert-comments-into-body "<div>body</div>" 'html info)))
(should (string= "<div>body</div>" result)))))
(ert-deftest test/insert-comments-ignores-non-html-backends ()
"For non-HTML backends the function currently returns nil (known bug:
`when' has no else branch so the body string is not passed through).
Fix: change `when' to `if' with body as the else clause.
This test documents current behaviour; flip the should once fixed."
(with-temp-org-file "#+TITLE: Test\n#+COMMENTS: t\n\nBody.\n"
(let* ((info (list :input-file temp-file))
(result (z/org-html-insert-comments-into-body "<div>body</div>" 'latex info)))
;; BUG: should be (should (string= "<div>body</div>" result))
(should (null result)))))
(ert-deftest test/insert-comments-handles-nil-input-file ()
"Should return body unchanged when :input-file is nil."
(let* ((info (list :input-file nil))
(result (z/org-html-insert-comments-into-body "<div>body</div>" 'html info)))
(should (string= "<div>body</div>" result))))
(ert-deftest test/insert-comments-slug-from-filename-when-no-slug-keyword ()
"Comments section data-slug should fall back to filename when #+SLUG absent."
(with-temp-org-file "#+TITLE: Test\n#+COMMENTS: t\n\nBody.\n"
(let* ((expected-slug (file-name-base temp-file))
(info (list :input-file temp-file))
(result (z/org-html-insert-comments-into-body "<div>body</div>" 'html info)))
(should (string-match-p (regexp-quote (format "data-slug=\"%s\"" expected-slug))
result)))))
;; ── z/lima-sitemap-format-entry ───────────────────────────────────────────────
(ert-deftest test/lima-sitemap-format-entry-skips-directories ()
"Directories should return nil."
(let* ((base-dir (make-temp-file "lima-test-" t))
(project (list "lima" :base-directory base-dir)))
(unwind-protect
(should-not (z/lima-sitemap-format-entry base-dir nil project))
(delete-directory base-dir t))))
(ert-deftest test/lima-sitemap-format-entry-formats-org-file ()
"Org files should produce a [[file:...][Title]] link."
(let* ((base-dir (make-temp-file "lima-test-" t))
(org-file (expand-file-name "my-note.org" base-dir))
(project (list "lima" :base-directory base-dir)))
(unwind-protect
(progn
(with-temp-file org-file
(insert "#+TITLE: My Note\n\nContent.\n"))
(let ((result (z/lima-sitemap-format-entry org-file nil project)))
(should (stringp result))
(should (string-match-p "\\[\\[file:my-note\\.html\\]" result))))
(delete-directory base-dir t))))
;; ── z/copy-neighbor-attachments ──────────────────────────────────────────────
(ert-deftest test/copy-neighbor-attachments-copies-matching-dirs ()
"Sibling .attachments.* directories should be copied to pub-dir."
(let* ((src-dir (make-temp-file "src-" t))
(pub-dir (make-temp-file "pub-" t))
(att-dir (expand-file-name ".attachments.my-note" src-dir))
(att-file (expand-file-name "image.png" att-dir)))
(unwind-protect
(progn
(make-directory att-dir t)
(with-temp-file att-file (insert "fake png"))
(z/copy-neighbor-attachments src-dir pub-dir)
(should (file-exists-p
(expand-file-name ".attachments.my-note/image.png" pub-dir))))
(delete-directory src-dir t)
(delete-directory pub-dir t))))
(ert-deftest test/copy-neighbor-attachments-ignores-non-matching ()
"Directories not starting with .attachments. should be left alone."
(let* ((src-dir (make-temp-file "src-" t))
(pub-dir (make-temp-file "pub-" t))
(other-dir (expand-file-name "regular-dir" src-dir)))
(unwind-protect
(progn
(make-directory other-dir t)
(z/copy-neighbor-attachments src-dir pub-dir)
(should-not (file-exists-p
(expand-file-name "regular-dir" pub-dir))))
(delete-directory src-dir t)
(delete-directory pub-dir t))))
(ert-deftest test/copy-neighbor-attachments-no-error-when-none-exist ()
"No error should be raised when there are no .attachments.* dirs."
(let* ((src-dir (make-temp-file "src-" t))
(pub-dir (make-temp-file "pub-" t)))
(unwind-protect
(should-not (z/copy-neighbor-attachments src-dir pub-dir))
(delete-directory src-dir t)
(delete-directory pub-dir t))))
;; ── z/org-html-add-body-classes ──────────────────────────────────────────────
;; These tests stub out z/wip-file-p and z/no-sidenotes-file-p so they run
;; without the full site infrastructure loaded.
(ert-deftest test/add-body-classes-adds-wip-class ()
"Should add class=\"wip\" to <body> when z/wip-file-p is t."
(with-temp-org-file "#+TITLE: WIP page\n\nContent.\n"
(cl-letf (((symbol-function 'z/wip-file-p) (lambda (_) t))
((symbol-function 'z/no-sidenotes-file-p) (lambda (_) nil)))
(let* ((info (list :input-file temp-file))
(output "<html><body><p>hello</p></body></html>")
(result (z/org-html-add-body-classes output 'html info)))
(should (string-match-p "class=\"wip\"" result))))))
(ert-deftest test/add-body-classes-adds-no-sidenotes-class ()
"Should add class=\"no-sidenotes\" when z/no-sidenotes-file-p is t."
(with-temp-org-file "#+TITLE: No sidenotes\n\nContent.\n"
(cl-letf (((symbol-function 'z/wip-file-p) (lambda (_) nil))
((symbol-function 'z/no-sidenotes-file-p) (lambda (_) t)))
(let* ((info (list :input-file temp-file))
(output "<html><body><p>hello</p></body></html>")
(result (z/org-html-add-body-classes output 'html info)))
(should (string-match-p "class=\"no-sidenotes\"" result))))))
(ert-deftest test/add-body-classes-combines-multiple-classes ()
"Both wip and no-sidenotes classes should appear when both predicates are t."
(with-temp-org-file "#+TITLE: Both\n\nContent.\n"
(cl-letf (((symbol-function 'z/wip-file-p) (lambda (_) t))
((symbol-function 'z/no-sidenotes-file-p) (lambda (_) t)))
(let* ((info (list :input-file temp-file))
(output "<html><body><p>hello</p></body></html>")
(result (z/org-html-add-body-classes output 'html info)))
(should (string-match-p "wip" result))
(should (string-match-p "no-sidenotes" result))))))
(ert-deftest test/add-body-classes-unchanged-when-no-classes ()
"Output should be unmodified when no special classes apply."
(with-temp-org-file "#+TITLE: Plain\n\nContent.\n"
(cl-letf (((symbol-function 'z/wip-file-p) (lambda (_) nil))
((symbol-function 'z/no-sidenotes-file-p) (lambda (_) nil)))
(let* ((info (list :input-file temp-file))
(output "<html><body><p>hello</p></body></html>")
(result (z/org-html-add-body-classes output 'html info)))
(should (string= output result))))))
(ert-deftest test/add-body-classes-ignores-non-html-backend ()
"For non-HTML backends the function currently returns nil (known bug:
`when' has no else branch so output is not passed through).
Fix: change `when' to `if' with output as the else clause.
This test documents current behaviour; flip the should once fixed."
(with-temp-org-file "#+TITLE: LaTeX\n\nContent.\n"
(cl-letf (((symbol-function 'z/wip-file-p) (lambda (_) t))
((symbol-function 'z/no-sidenotes-file-p) (lambda (_) t)))
(let* ((info (list :input-file temp-file))
(output "\\documentclass{article}")
(result (z/org-html-add-body-classes output 'latex info)))
;; BUG: should be (should (string= output result))
(should (null result))))))
;;; build-site-tests.el ends here

View File

@@ -6,32 +6,127 @@
;;; Commentary:
;; Run this file with:
;; emacs -Q --script build-site.el
;; emacs -Q --script build-site.el
;;
;; Optional env vars:
;; SITE_FORCE=1 Force republish all files (default: incremental)
;; SITE_DRY=1 Parse and prepare only; skip org-publish-all
;;; Code:
(require 'package)
(defvar site-root
(file-name-directory
(or load-file-name buffer-file-name)))
;; ─────────────────────────────────────────────────────────────────────────────
;; 0. Bootstrap: paths and load-path
;; ─────────────────────────────────────────────────────────────────────────────
(defconst z/build-start-time (float-time)
"Wall-clock time when the build started.")
(defconst z/site-root
(file-name-as-directory
(file-name-directory
(or load-file-name buffer-file-name)))
"Absolute path to the site root (always ends with /).
This is the single authoritative definition — lisp/* files must NOT
redefine site-root themselves.")
;; Keep the old name around so any stray code still compiles.
(defvaralias 'site-root 'z/site-root)
(defun site-path (path)
(expand-file-name path site-root))
"Expand PATH relative to `z/site-root'."
(expand-file-name path z/site-root))
(add-to-list 'load-path (site-path "lisp"))
(add-to-list 'load-path
(expand-file-name "lisp"
(file-name-directory
(or load-file-name buffer-file-name))))
;; ─────────────────────────────────────────────────────────────────────────────
;; 1. Logging helpers (ANSI colours for terminal output)
;; ─────────────────────────────────────────────────────────────────────────────
(require 'recently-updated)
(require 'tags)
(require 'sidenotes)
(require 'sitemaps)
(defconst z/colour-reset "\033[0m")
(defconst z/colour-bold "\033[1m")
(defconst z/colour-dim "\033[2m")
(defconst z/colour-green "\033[32m")
(defconst z/colour-yellow "\033[33m")
(defconst z/colour-cyan "\033[36m")
(defconst z/colour-red "\033[31m")
(defconst z/colour-blue "\033[34m")
(defconst z/colour-magenta "\033[35m")
(setq package-user-dir (expand-file-name "./.packages"))
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
(defun z/log (level fmt &rest args)
"Emit a coloured build-log line.
LEVEL is one of: info warn error step metric done.
FMT / ARGS are passed to `format'."
(let* ((msg (apply #'format fmt args))
(prefix
(pcase level
('info (concat z/colour-cyan " INFO " z/colour-reset))
('warn (concat z/colour-yellow " WARN " z/colour-reset))
('error (concat z/colour-red " ERROR " z/colour-reset))
('step (concat z/colour-blue z/colour-bold
" ──── " z/colour-reset))
('metric (concat z/colour-magenta "" z/colour-reset))
('done (concat z/colour-green z/colour-bold
"" z/colour-reset))
(_ " "))))
(message "%s%s" prefix msg)))
(defun z/log-separator (&optional label)
"Print a coloured separator line, optionally with LABEL."
(if label
(message "%s%s── %s %s%s"
z/colour-dim z/colour-bold label
(make-string (max 0 (- 60 (length label))) ?─)
z/colour-reset)
(message "%s%s%s"
z/colour-dim
(make-string 66 ?─)
z/colour-reset)))
(defmacro z/with-timing (label &rest body)
"Execute BODY, then log elapsed seconds under LABEL."
(declare (indent 1))
(let ((t0 (gensym "t0")))
`(let ((,t0 (float-time)))
(prog1 (progn ,@body)
(z/log 'metric "%s took %.2fs" ,label (- (float-time) ,t0))))))
;; ─────────────────────────────────────────────────────────────────────────────
;; 2. Package bootstrap
;; ─────────────────────────────────────────────────────────────────────────────
(z/log-separator "Package setup")
(require 'package)
(setq package-user-dir (site-path ".packages"))
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(z/with-timing "Package archive refresh"
(unless package-archive-contents
(z/log 'info "Refreshing package archive contents…")
(condition-case err
(package-refresh-contents)
(error
(z/log 'warn "Could not refresh archives: %s" (error-message-string err))))))
(z/with-timing "htmlize install"
(unless (package-installed-p 'htmlize)
(z/log 'info "Installing htmlize…")
(condition-case err
(package-install 'htmlize)
(error
(z/log 'error "htmlize install failed: %s" (error-message-string err))
(error "Cannot continue without htmlize")))))
(require 'htmlize)
;; ─────────────────────────────────────────────────────────────────────────────
;; 3. Org / ox requires
;; ─────────────────────────────────────────────────────────────────────────────
(require 'ox-publish)
(require 'cl-lib)
@@ -40,154 +135,176 @@
(require 'ox-html)
(require 'ox-md)
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
;; ─────────────────────────────────────────────────────────────────────────────
;; 4. Local library requires (after load-path is set)
;; ─────────────────────────────────────────────────────────────────────────────
(package-install 'htmlize)
(add-to-list 'load-path "~/master-folder/org_files/org_web/")
(require 'htmlize)
(z/log-separator "Local libraries")
(defvar z-shared-head
"
<link rel=\"icon\" type=\"image/png\" sizes=\"48x48\" href=\"/assets/icons/icons8-film-tape-100.png\" />
(dolist (lib '(recently-updated tags sidenotes sitemaps))
(condition-case err
(progn
(require lib)
(z/log 'done "Loaded %s" lib))
(error
(z/log 'error "Failed to load %s: %s" lib (error-message-string err))
(error "Aborting: required library %s missing" lib))))
<link rel=\"stylesheet\" href=\"/assets/styles/style.css\" />
<link rel=\"stylesheet\" href=\"/assets/styles/bigger-picture.min.css\" />
<link rel=\"stylesheet\" href=\"/assets/styles/comments.css\" />
<link rel=\"stylesheet\" href=\"/assets/styles/kanban.css\" />
<link rel=\"stylesheet\" href=\"/assets/styles/org-syntax.css\" />
<link rel=\"stylesheet\" href=\"/assets/styles/misc.css\" />
<link rel=\"stylesheet\" href=\"/assets/styles/toc.css\" />
<link rel=\"stylesheet\" href=\"/assets/styles/media.css\" />
<link rel=\"stylesheet\" href=\"/assets/styles/wird-tracker.css\" />
;; ─────────────────────────────────────────────────────────────────────────────
;; 5. HTML export settings
;; ─────────────────────────────────────────────────────────────────────────────
<script src=\"/assets/scripts/script.js\" defer></script>
<script src=\"/assets/scripts/lunr.js\" defer></script>
<script src=\"/assets/scripts/competency-status-board.js\" defer></script>
<script src=\"/assets/scripts/notes.js\" defer></script>
<script src=\"/assets/scripts/comments.js\" defer></script>
<script src=\"/assets/scripts/bigger-picture.min.js\" defer></script>
<script src=\"/assets/scripts/search.js\" defer></script>
<script src=\"/assets/scripts/svg-pan-zoom.min.js\" defer></script>
<script src=\"/assets/scripts/gallery-init.js\" defer></script>
<script src=\"/assets/scripts/sitemap-interactive.js\" defer></script>
<script src=\"/assets/scripts/wird-tracker.js\" defer></script>
"
)
(setq org-html-htmlize-output-type 'css)
(defvar z/shared-head
(concat
"<link rel=\"icon\" type=\"image/png\" sizes=\"48x48\""
" href=\"/assets/icons/icons8-film-tape-100.png\" />\n"
(mapconcat
(lambda (f)
(format "<link rel=\"stylesheet\" href=\"/assets/styles/%s\" />" f))
'("style.css"
"bigger-picture.min.css"
"comments.css"
"kanban.css"
"org-syntax.css"
"misc.css"
"toc.css"
"media.css"
"wird-tracker.css")
"\n")
"\n"
(mapconcat
(lambda (f)
(format "<script src=\"/assets/scripts/%s\" defer></script>" f))
'("script.js"
"lunr.js"
"competency-status-board.js"
"notes.js"
"comments.js"
"bigger-picture.min.js"
"search.js"
"svg-pan-zoom.min.js"
"gallery-init.js"
"sitemap-interactive.js"
"wird-tracker.js")
"\n"))
"Shared <head> HTML fragment injected into every page.")
;; ─────────────────────────────────────────────────────────────────────────────
;; 6. Global Org macros
;; ─────────────────────────────────────────────────────────────────────────────
(setq org-export-global-macros
(append
org-export-global-macros
'(("sidenote"
. "@@html:<label for=\"sn$1\" class=\"margin-toggle sidenote-number\"></label><input type=\"checkbox\" id=\"sn$1\" class=\"margin-toggle\"/><span class=\"sidenote\">$2</span>@@")
("epigraph" . "@@html:<div class=\"epigraph\"><blockquote>$1<footer>$2</footer></blockquote></div>@@")
("epigraph_single" . "@@html:<div class=\"epigraph\"><blockquote>$1</blockquote></div>@@")
("epigraph3" . "@@html:<div class=\"epigraph\"><blockquote>$1<footer>$2, <cite>$3</cite></footer></blockquote></div>@@")
("kbd" . "@@html:<kbd>$1</kbd>@@@@latex:\\texttt{$1}@@")
("margimg"
. "@@html:<aside class=\"marginnote\"><figure class=\"mn-fig\"><img src=\"$1\" alt=\"$2\" class=\"mn-img\" loading=\"lazy\" decoding=\"async\"/>$3</figure></aside>@@")
("countdown" . "@@html:<time class=\"countdown\" datetime=\"$1\" data-label=\"$2\"></time>@@")
. "@@html:<label for=\"sn$1\" class=\"margin-toggle sidenote-number\"></label>\
<input type=\"checkbox\" id=\"sn$1\" class=\"margin-toggle\"/>\
<span class=\"sidenote\">$2</span>@@")
("epigraph"
. "@@html:<div class=\"epigraph\"><blockquote>$1<footer>$2</footer></blockquote></div>@@")
("epigraph_single"
. "@@html:<div class=\"epigraph\"><blockquote>$1</blockquote></div>@@")
("epigraph3"
. "@@html:<div class=\"epigraph\"><blockquote>$1<footer>$2, <cite>$3</cite></footer></blockquote></div>@@")
("kbd"
. "@@html:<kbd>$1</kbd>@@@@latex:\\texttt{$1}@@")
("margimg"
. "@@html:<aside class=\"marginnote\"><figure class=\"mn-fig\">\
<img src=\"$1\" alt=\"$2\" class=\"mn-img\" loading=\"lazy\" decoding=\"async\"/>$3\
</figure></aside>@@")
("countdown"
. "@@html:<time class=\"countdown\" datetime=\"$1\" data-label=\"$2\"></time>@@"))))
;; ─────────────────────────────────────────────────────────────────────────────
;; 7. Preamble / postamble
;; ─────────────────────────────────────────────────────────────────────────────
org-export-global-macros)))
(defvar z-preamble
"
<div class=\"banner-header\">
<a href=\"/\"> <img src=\"/assets/images/gr.png\" alt=\"Site Logo\" class=\"banner-logo\" /> </a>
(defvar z/preamble
"<div class=\"banner-header\">
<a href=\"/\"><img src=\"/assets/images/gr.png\" alt=\"Site Logo\" class=\"banner-logo\" /></a>
<nav>
<a href=\"/\">Home | </a>
<a href=\"/blogs/blogs-list.html \">Blogs | </a>
<a href=\"/blogs/blogs-list.html\">Blogs | </a>
<a href=\"/posts/career/career-list.html\">Career | </a>
<a href=\"https://zone.zainezq.com\">Dashboard</a>
<input type=\"search\\\" id=\"search-input\" placeholder=\"Search…\" aria-label=\"Search notes\" />
<input type=\"search\" id=\"search-input\" placeholder=\"Search…\" aria-label=\"Search notes\" />
<button id=\"search-btn\" aria-label=\"Search\">🔍</button>
</nav>
<button class=\"theme-toggle\" id=\"theme-toggle\" type=\"button\" aria-label=\"Toggle dark mode\">🌗 Theme</button>
</div>
<div id=\"updated\">Updated: %C</div>
")
</div>
<div id=\"updated\">Updated: %C</div>
"
)
(defvar z-postamble
(defvar z/postamble
"<footer>
<div class=\"copyright-container\">
<div class=\"copyright\">
Copyright &copy; 2022-2026 Zaine Qayyum. All rights reserved unless otherwise noted.</div></div>
<div class=\"generated\">
Created with %c on <a href=\"https://www.archlinux.org/\">Arch</a> <a href=\"https://www.gnu.org\">GNU</a>/<a href=\"https://www.kernel.org/\">Linux</a>
Created with %c on <a href=\"https://www.archlinux.org/\">Arch</a> \
<a href=\"https://www.gnu.org\">GNU</a>/<a href=\"https://www.kernel.org/\">Linux</a>
</div>
</footer>")
;; ─────────────────────────────────────────────────────────────────────────────
;; 8. Comments support
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/comments-file-p (file)
"Return non-nil if FILE has comments enabled.
A file has comments if:
- It has a #+COMMENTS: keyword with value \"t\" (case-insensitive)."
"Return non-nil if FILE has #+COMMENTS: t."
(when (file-exists-p file)
(with-temp-buffer
(insert-file-contents file)
(org-mode)
(let* ((keywords (org-collect-keywords '("COMMENTS")))
(comments (cadr (assoc "COMMENTS" keywords))))
(print keywords)
(and comments
(string-match-p "^\\s-*t\\s-*$"
(downcase comments)))))))
(val (cadr (assoc "COMMENTS" keywords))))
(and val
(string-match-p "^\\s-*t\\s-*$" (downcase val)))))))
(defun z/comments-file-slug (file)
"Return page slug from #+SLUG: or fallback to filename."
"Return page slug from #+SLUG: or fallback to filename base."
(with-temp-buffer
(insert-file-contents file)
(org-mode)
(let* ((keywords (org-collect-keywords '("SLUG")))
(slug (cadr (assoc "SLUG" keywords))))
(slug (cadr (assoc "SLUG" keywords))))
(if (and slug (string-match-p "\\S-" slug))
slug
(file-name-base file)))))
(defun z/org-html-insert-comments-into-body (body backend info)
"Insert comments section at the end of the document body."
"Append a comments section to BODY for files that opt in."
(when (org-export-derived-backend-p backend 'html)
(let ((input-file (plist-get info :input-file)))
(if (and input-file
(z/comments-file-p input-file))
(if (and input-file (z/comments-file-p input-file))
(let* ((slug (z/comments-file-slug input-file))
(comments-html
(format
"
<section id=\"comments\" class=\"comments\" data-slug=\"%s\">
(html (format
"\n<section id=\"comments\" class=\"comments\" data-slug=\"%s\">
<h2>Comments</h2>
<div id=\"comments-list\" class=\"comments-list\">
<noscript>Please enable JavaScript to view comments.</noscript>
</div>
<form id=\"comment-form\" class=\"comment-form\">
<label class=\"comment-author\">
<span>Name (optional)</span>
<input type=\"text\" name=\"author\"/>
</label>
<label class=\"comment-content\">
<span>Your comment</span>
<textarea name=\"content\" required></textarea>
</label>
<button type=\"submit\">Post comment</button>
</form>
</section>
"
slug)))
(concat body comments-html))
</section>\n"
slug)))
(concat body html))
body))))
;; ─────────────────────────────────────────────────────────────────────────────
;; 9. Body-class injection (WIP / no-sidenotes)
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/org-html-add-body-classes (output backend info)
"Add layout-related classes to <body> based on file metadata."
@@ -196,11 +313,9 @@ A file has comments if:
(classes
(delq nil
(list
(when (and input-file
(z/wip-file-p input-file))
(when (and input-file (z/wip-file-p input-file))
"wip")
(when (and input-file
(z/no-sidenotes-file-p input-file))
(when (and input-file (z/no-sidenotes-file-p input-file))
"no-sidenotes")))))
(if classes
(replace-regexp-in-string
@@ -215,33 +330,31 @@ A file has comments if:
(add-to-list 'org-export-filter-body-functions
#'z/org-html-insert-comments-into-body)
(defun z/lima--ensure-sitemap-file (project)
"Ensure the sitemap source file exists under the project's base directory."
(let* ((base-dir (file-name-as-directory
(org-publish-property :base-directory project)))
(fname (or (org-publish-property :sitemap-filename project)
"lima-list.org"))
(title (or (org-publish-property :sitemap-title project)
"Lima"))
(sitemap-path (expand-file-name fname base-dir)))
;; If file missing or you want to always regenerate, write header.
(unless (file-exists-p sitemap-path)
(with-temp-file sitemap-path
(insert "#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil\n\n")))))
;; ─────────────────────────────────────────────────────────────────────────────
;; 10. Custom z-html backend
;; ─────────────────────────────────────────────────────────────────────────────
(org-export-define-derived-backend 'z-html 'html
:filters-alist '((:filter-final-output . z/insert-filetags-after-title)))
(defun z/z-publish-to-html (plist filename pub-dir)
"Publish FILENAME to HTML using the z-html backend."
(org-publish-org-to 'z-html filename ".html" plist pub-dir))
;; ─────────────────────────────────────────────────────────────────────────────
;; 11. Lima project helpers
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/lima-sitemap-format-entry (entry style project)
"Format sitemap entry for Lima; skip dirs, keep nested paths, and prefix /lima/."
(let* ((file (if (listp entry) (car entry) entry))
"Format a sitemap entry for Lima; skip directories."
(let* ((file (if (listp entry) (car entry) entry))
(base-dir (file-name-as-directory
(org-publish-property :base-directory project)))
;; Ensure we work with an absolute file path under base-dir
(abs (if (file-name-absolute-p file)
file
(expand-file-name file base-dir))))
;; Skip directories
(abs (if (file-name-absolute-p file)
file
(expand-file-name file base-dir))))
(unless (file-directory-p abs)
(let* ((rel (file-relative-name abs base-dir)) ;; guaranteed no “…/..” backtracking now
(let* ((rel (file-relative-name abs base-dir))
(rel-noext (file-name-sans-extension rel))
(title (org-publish-find-title abs project)))
(format "[[file:%s.html][%s]]"
@@ -249,69 +362,47 @@ A file has comments if:
(or title (file-name-nondirectory rel-noext)))))))
(defun z/copy-neighbor-attachments (source-dir pub-dir)
"Copy sibling directories named .attachments.* from SOURCE-DIR to PUB-DIR."
(let ((dirs (directory-files source-dir t "^\\.attachments\\..+")))
(dolist (d dirs)
(when (file-directory-p d)
(let* ((target (expand-file-name (file-name-nondirectory d) pub-dir)))
(make-directory target t)
;; copy-directory: (DIRECTORY NEWNAME &optional KEEP-TIME PARENTS COPY-CONTENTS)
(copy-directory d target t t t))))))
"Copy sibling .attachments.* directories from SOURCE-DIR into PUB-DIR."
(dolist (d (directory-files source-dir t "^\\.attachments\\..+"))
(when (file-directory-p d)
(let ((target (expand-file-name (file-name-nondirectory d) pub-dir)))
(make-directory target t)
(copy-directory d target t t t)))))
(defun z/publish-lima-file (plist filename pub-dir)
"Publish Org or Markdown file from lima directory."
(let* ((ext (downcase (or (file-name-extension filename) "")))
(base (file-name-base filename))
"Publish an Org or Markdown file from the lima directory."
(let* ((ext (downcase (or (file-name-extension filename) "")))
(base (file-name-base filename))
(src-dir (file-name-directory filename)))
(cond
;; ORG FILES (publish as-is)
;; ── Org files ──────────────────────────────────────────────────────────
((string= ext "org")
;; Ensure sibling .attachments.* are published
(z/copy-neighbor-attachments src-dir pub-dir)
(org-publish-org-to 'z-html filename ".html" plist pub-dir))
;; MARKDOWN FILES
;; ── Markdown files ─────────────────────────────────────────────────────
((string= ext "md")
(let* ((temp-org
(expand-file-name
(concat base ".org")
(make-temp-file "lima-build-" t))))
;; Convert Markdown → Org with pandoc
(call-process "pandoc" nil nil nil
filename "-f" "markdown" "-t" "org" "-o" temp-org)
;; Ensure #+TITLE exists
;; Ensure front matter at top of temp-org
(with-temp-buffer
(insert-file-contents temp-org)
;; Build values
(let* ((title base)
(slug base)
(date (format-time-string "<%Y-%m-%d %a %H:%M>")))
(goto-char (point-min))
;; Insert front matter
;; (Always ensure they are at the absolute top)
(insert "#+TITLE: " title "\n"
"#+OPTIONS: num:nil\n"
"#+DATE: " date "\n"
"#+COMMENTS: t\n"
"#+SLUG: " slug "\n\n"))
;; Write back to file
(write-region (point-min) (point-max) temp-org))
;; Ensure sibling .attachments.* are published
(let* ((tmp-dir (make-temp-file "lima-build-" t))
(temp-org (expand-file-name (concat base ".org") tmp-dir)))
;; Markdown → Org
(let ((rc (call-process "pandoc" nil nil nil
filename "-f" "markdown" "-t" "org" "-o" temp-org)))
(unless (zerop rc)
(z/log 'error "pandoc failed (rc=%d) for %s" rc filename)
(error "pandoc conversion failed for %s" filename)))
;; Prepend front matter
(with-temp-buffer
(insert-file-contents temp-org)
(goto-char (point-min))
(insert (format "#+TITLE: %s\n#+OPTIONS: num:nil\n#+DATE: %s\n#+COMMENTS: t\n#+SLUG: %s\n\n"
base
(format-time-string "<%Y-%m-%d %a %H:%M>")
base))
(write-region (point-min) (point-max) temp-org))
;; Publish
(z/copy-neighbor-attachments src-dir pub-dir)
;; Publish using ORIGINAL base name
(let ((output-file (expand-file-name (concat base ".html") pub-dir)))
(org-publish-org-to 'z-html temp-org ".html" plist pub-dir)
;; temp-org base may differ; normalize to requested base
(let ((generated (expand-file-name
(concat (file-name-base temp-org) ".html")
pub-dir)))
@@ -319,24 +410,24 @@ A file has comments if:
(not (string-equal generated output-file)))
(rename-file generated output-file t))))))
;; ── Fallback: treat as attachment ──────────────────────────────────────
(t
;; Default: treat as attachment
(org-publish-attachment plist filename pub-dir)))))
(setq org-html-htmlize-output-type 'css)
(org-export-define-derived-backend 'z-html 'html
:filters-alist '((:filter-final-output . z/insert-filetags-after-title)))
;; ─────────────────────────────────────────────────────────────────────────────
;; 12. Preparation hooks
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/org-main-prep (_project)
(z/generate-recently-updated-org 26))
"Pre-publish hook: regenerate recently-updated.org."
(z/log 'step "Generating recently-updated.org…")
(z/with-timing "recently-updated generation"
(z/generate-recently-updated-org 26)))
(defun z/z-publish-to-html (plist filename pub-dir)
"Publish FILENAME to HTML using the z-html backend."
(org-publish-org-to 'z-html filename ".html" plist pub-dir))
;; ─────────────────────────────────────────────────────────────────────────────
;; 13. Publishing project alist
;; ─────────────────────────────────────────────────────────────────────────────
;; Define the publishing project
(setq org-publish-project-alist
`(("org-main"
:recursive t
@@ -348,11 +439,18 @@ A file has comments if:
:sitemap-filename "sitemap.org"
:sitemap-title "Sitemap"
:sitemap-sort-files chronologically
:html-preamble ,z-preamble
:html-postamble ,z-postamble
:html-head ,z-shared-head
:html-preamble ,z/preamble
:html-postamble ,z/postamble
:html-head ,z/shared-head
:preparation-function z/org-main-prep)
("org-assets"
:base-directory ,(site-path "assets/")
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|svg\\|pdf\\|woff\\|woff2\\|ttf"
:publishing-directory ,(site-path "output/assets/")
:recursive t
:publishing-function org-publish-attachment)
("org-categories-sitemap"
:recursive t
:base-directory ,(site-path "home/")
@@ -362,9 +460,9 @@ A file has comments if:
:sitemap-filename "categories.org"
:sitemap-title "Categories"
:sitemap-function z/categories-sitemap
:html-preamble ,z-preamble
:html-postamble ,z-postamble
:html-head ,z-shared-head)
:html-preamble ,z/preamble
:html-postamble ,z/postamble
:html-head ,z/shared-head)
("org-posts"
:base-directory ,(site-path "posts/")
@@ -377,15 +475,15 @@ A file has comments if:
:html-validation-link nil
:with-toc t
:section-numbers t
:html-preamble ,z-preamble
:html-postamble ,z-postamble
:html-preamble ,z/preamble
:html-postamble ,z/postamble
:auto-sitemap t
:sitemap-filename "posts-list.org"
:sitemap-title "Posts List"
:sitemap-style list
:sitemap-function z/posts-sitemap
:sitemap-sort-files anti-chronologically
:html-head ,z-shared-head)
:html-head ,z/shared-head)
("org-blogs"
:base-directory ,(site-path "blogs/")
@@ -396,15 +494,15 @@ A file has comments if:
:with-author nil
:with-creator nil
:html-validation-link nil
:html-preamble ,z-preamble
:html-postamble ,z-postamble
:html-preamble ,z/preamble
:html-postamble ,z/postamble
:auto-sitemap t
:sitemap-filename "blogs-list.org"
:sitemap-title "Blogs List"
:sitemap-style list
:sitemap-function z/blogs-grouped-sitemap
:sitemap-sort-files anti-chronologically
:html-head ,z-shared-head)
:html-head ,z/shared-head)
("org-books"
:base-directory ,(site-path "books/")
@@ -412,49 +510,15 @@ A file has comments if:
:recursive t
:base-extension "org"
:publishing-function z/z-publish-to-html
:html-preamble ,z-preamble
:html-postamble ,z-postamble
:html-preamble ,z/preamble
:html-postamble ,z/postamble
:auto-sitemap t
:sitemap-filename "books-list.org"
:sitemap-title "Books List"
:sitemap-style list
:sitemap-function z/books-sitemap
:sitemap-sort-files anti-chronologically
:html-head ,z-shared-head)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ("org-2025" ;;
;; :base-directory ,(site-path "blogs/2025/") ;;
;; :publishing-directory ,(site-path "output/blogs/2025/") ;;
;; :recursive t ;;
;; :base-extension "org" ;;
;; :publishing-function z/z-publish-to-html ;;
;; :html-preamble ,z-preamble ;;
;; :html-postamble ,z-postamble ;;
;; :auto-sitemap t ;;
;; :sitemap-filename "2025-list.org" ;;
;; :sitemap-title "2025 List" ;;
;; :sitemap-style list ;;
;; :sitemap-function z/2025-sitemap ;;
;; :sitemap-sort-files anti-chronologically ;;
;; :html-head ,z-shared-head) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ("org-2026"
;; :base-directory ,(site-path "blogs/2026/")
;; :publishing-directory ,(site-path "output/blogs/2026/")
;; :recursive t
;; :base-extension "org"
;; :publishing-function z/z-publish-to-html
;; :html-preamble ,z-preamble
;; :html-postamble ,z-postamble
;; :auto-sitemap t
;; :sitemap-filename "2026-list.org"
;; :sitemap-title "2026 List"
;; :sitemap-style list
;; :sitemap-function z/2026-sitemap
;; :sitemap-sort-files anti-chronologically
;; :html-head ,z-shared-head)
:html-head ,z/shared-head)
("org-career"
:base-directory ,(site-path "posts/career/")
@@ -462,15 +526,15 @@ A file has comments if:
:recursive t
:base-extension "org"
:publishing-function z/z-publish-to-html
:html-preamble ,z-preamble
:html-postamble ,z-postamble
:html-preamble ,z/preamble
:html-postamble ,z/postamble
:auto-sitemap t
:sitemap-filename "career-list.org"
:sitemap-title "Career List"
:sitemap-style list
:sitemap-function z/career-sitemap
:sitemap-sort-files anti-chronologically
:html-head ,z-shared-head)
:html-head ,z/shared-head)
("wip-pages"
:base-directory ,(site-path "")
@@ -478,15 +542,15 @@ A file has comments if:
:recursive t
:base-extension "org"
:publishing-function z/z-publish-to-html
:html-preamble ,z-preamble
:html-postamble ,z-postamble
:html-preamble ,z/preamble
:html-postamble ,z/postamble
:auto-sitemap t
:sitemap-filename "wip.org"
:sitemap-title "Work in progress"
:sitemap-style list
:sitemap-function z/wip-sitemap
:sitemap-sort-files anti-chronologically
:html-head ,z-shared-head)
:html-head ,z/shared-head)
("org-tags"
:base-directory ,(site-path "tags/")
@@ -494,42 +558,152 @@ A file has comments if:
:recursive t
:base-extension "org"
:publishing-function org-html-publish-to-html
:html-preamble ,z-preamble
:html-postamble ,z-postamble
:html-head ,z-shared-head)
:html-preamble ,z/preamble
:html-postamble ,z/postamble
:html-head ,z/shared-head)
("org-lima"
:base-directory ,(site-path "lima/")
:publishing-directory ,(site-path "output/lima/")
:recursive t
:base-extension "org\\|md"
:publishing-function z/publish-lima-file
:with-author nil
:with-creator nil
:html-validation-link nil
:html-preamble ,z-preamble
:html-postamble ,z-postamble
:sitemap-filename "lima-list.org"
:auto-sitemap t
:sitemap-title "Lima"
:sitemap-style list
:sitemap-sort-files anti-chronologically
:sitemap-format-entry z/lima-sitemap-format-entry
:html-head ,z-shared-head)
("org-assets"
:base-directory ,(site-path "assets/")
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|svg\\|pdf\\|woff\\|woff2\\|ttf"
:publishing-directory ,(site-path "output/assets/")
("org-lima"
:base-directory ,(site-path "lima/")
:publishing-directory ,(site-path "output/lima/")
:recursive t
:publishing-function org-publish-attachment)))
:base-extension "org\\|md"
:publishing-function z/publish-lima-file
:with-author nil
:with-creator nil
:html-validation-link nil
:html-preamble ,z/preamble
:html-postamble ,z/postamble
:sitemap-filename "lima-list.org"
:auto-sitemap t
:sitemap-title "Lima"
:sitemap-style list
:sitemap-sort-files anti-chronologically
:sitemap-format-entry z/lima-sitemap-format-entry
:html-head ,z/shared-head)))
(delete-directory (site-path "output/") t)
(delete-directory (site-path "tags/") t)
(message "Directory deleted")
;; ─────────────────────────────────────────────────────────────────────────────
;; 14. Pre-build clean-up (opt-in via SITE_CLEAN=1)
;; ─────────────────────────────────────────────────────────────────────────────
;;
;; IMPORTANT: output/ and .org-timestamps/ are a matched pair.
;; .org-timestamps/ is org-publish's cache of every file's last-published
;; mtime. If output/ is wiped without also wiping .org-timestamps/, the next
;; incremental build sees "cache says up-to-date" but the output file is gone,
;; so it silently skips the file. That is why assets/ and index.html vanished.
;;
;; Rule: whenever output/ is deleted, .org-timestamps/ must be deleted too.
(z/write-tag-pages)
(org-publish-all t)
(message "Build complete!")
(z/log-separator "Pre-build")
(defun z/wipe-build-dirs ()
"Delete output/, tags/, and .org-timestamps/ together."
(dolist (dir (list (site-path "output/")
(site-path "tags/")
(site-path ".org-timestamps/")))
(if (file-directory-p dir)
(progn
(z/with-timing (format "delete %s"
(file-name-nondirectory
(directory-file-name dir)))
(delete-directory dir t))
(z/log 'done "Deleted %s" dir))
(z/log 'info "Already absent: %s" dir))))
(defun z/output-integrity-ok-p ()
"Return t if critical output paths all exist.
Returns nil (and logs warnings) if assets/ or any top-level HTML is missing.
A nil result means the timestamp cache is stale and we must force-republish."
(let ((missing '()))
(unless (file-directory-p (site-path "output/assets/"))
(push "output/assets/" missing))
(unless (or (file-exists-p (site-path "output/index.html"))
(file-exists-p (site-path "output/sitemap.html")))
(push "output/index.html (or sitemap.html)" missing))
(dolist (m missing)
(z/log 'warn "Integrity check: missing %s" m))
(null missing)))
(cond
;; ── Explicit clean requested ───────────────────────────────────────────────
((getenv "SITE_CLEAN")
(z/log 'warn "SITE_CLEAN=1 — wiping output/, tags/, and .org-timestamps/")
(z/wipe-build-dirs)
(setenv "SITE_FORCE" "1"))
;; ── Output looks incomplete — cache is stale ──────────────────────────────
;; Catches the case where output/ was wiped externally (git clean, manual rm,
;; Syncthing conflict) without clearing .org-timestamps/. Without this guard
;; org-publish would silently skip every "up-to-date" file and produce a
;; broken site with missing assets and pages.
((not (z/output-integrity-ok-p))
(z/log 'warn "Output integrity check failed — timestamp cache is stale")
(z/log 'warn "Clearing .org-timestamps/ and forcing full republish")
(let ((ts-dir (site-path ".org-timestamps/")))
(when (file-directory-p ts-dir)
(z/with-timing "delete .org-timestamps"
(delete-directory ts-dir t))
(z/log 'done "Deleted .org-timestamps/")))
(setenv "SITE_FORCE" "1"))
;; ── Normal incremental build ──────────────────────────────────────────────
(t
(z/log 'info "Incremental build — output/ looks complete")))
;; ─────────────────────────────────────────────────────────────────────────────
;; 15. Tag pages
;; ─────────────────────────────────────────────────────────────────────────────
(z/log-separator "Tag generation")
(z/with-timing "tag page generation"
(condition-case err
(let ((n (z/write-tag-pages)))
(z/log 'done "Tag pages written%s"
(if (numberp n) (format " (%d tags)" n) "")))
(error
(z/log 'error "Tag generation failed: %s" (error-message-string err))
(error "Aborting build: tag generation error"))))
;; ─────────────────────────────────────────────────────────────────────────────
;; 16. Publish
;; ─────────────────────────────────────────────────────────────────────────────
(z/log-separator "Publishing")
(if (getenv "SITE_DRY")
(z/log 'warn "SITE_DRY=1 — skipping org-publish-all (dry run)")
(let ((force (not (not (getenv "SITE_FORCE")))))
(when force
(z/log 'info "SITE_FORCE=1 — forcing republish of all files"))
(condition-case err
(z/with-timing "org-publish-all"
(org-publish-all force))
(error
(z/log 'error "org-publish-all failed: %s" (error-message-string err))
(error "Build failed")))))
;; ─────────────────────────────────────────────────────────────────────────────
;; 17. Build summary
;; ─────────────────────────────────────────────────────────────────────────────
(z/log-separator "Build summary")
(let* ((elapsed (- (float-time) z/build-start-time))
(out-dir (site-path "output/"))
(html-files (when (file-directory-p out-dir)
(length (directory-files-recursively out-dir "\\.html\\'"))))
(css-files (when (file-directory-p out-dir)
(length (directory-files-recursively out-dir "\\.css\\'"))))
(js-files (when (file-directory-p out-dir)
(length (directory-files-recursively out-dir "\\.js\\'"))))
(tag-files (let ((td (site-path "output/tags/")))
(when (file-directory-p td)
(length (directory-files td nil "\\.html\\'"))))))
(z/log 'metric "Total elapsed : %.2fs" elapsed)
(z/log 'metric "HTML files output: %d" (or html-files 0))
(z/log 'metric "CSS files output: %d" (or css-files 0))
(z/log 'metric "JS files output: %d" (or js-files 0))
(z/log 'metric "Tag pages output: %d" (or tag-files 0))
(z/log 'done "Build complete ✓"))
;;; build-site.el ends here

View File

@@ -1,30 +1,30 @@
#+TITLE: Recently Updated
#+OPTIONS: toc:nil num:nil
* Recently Updated (top 26 files - per lima's request)
- [[file:home/wird-tracker.org][Wird Tracker]] @@html:<span class="post-date">2026-03-19 16:05</span>@@
- [[file:blogs/2026/03-march/setting-a-wird-tracker-19-03.org][Setting a Wird Tracker]] @@html:<span class="post-date">2026-03-19 13:57</span>@@
- [[file:index.org][Home Page]] @@html:<span class="post-date">2026-03-19 13:10</span>@@
* Recently Updated (top 26 files)
- [[file:home/wird-tracker.org][Wird Tracker]] @@html:<span class="post-date">2026-03-19 18:26</span>@@
- [[file:blogs/2026/03-march/setting-a-wird-tracker-19-03.org][Setting a Wird Tracker]] @@html:<span class="post-date">2026-03-19 13:15</span>@@
- [[file:home/guide/wird-tracker-guide.org][Wird Tracker — Technical Guide]] @@html:<span class="post-date">2026-03-19 12:43</span>@@
- [[file:blogs/2026/03-march/fixing-the-dag-18-03.org][DAG fixes]] @@html:<span class="post-date">2026-03-19 10:42</span>@@
- [[file:blogs/2026/03-march/feeling-sleepy.org][Feeling extremely sleepy]] @@html:<span class="post-date">2026-03-19 10:41</span>@@
- [[file:blogs/2026/03-march/oversleeping-16-03.org][Oversleeping and missing a meeting...]] @@html:<span class="post-date">2026-03-16 12:17</span>@@
- [[file:blogs/2026/03-march/15-03-week-review.org][[15-03-2026] - Weekly Review]] @@html:<span class="post-date">2026-03-12 16:31</span>@@
- [[file:blogs/2026/03-march/08-03-week-review.org][[08-03-2026] - Weekly Review]] @@html:<span class="post-date">2026-03-12 16:17</span>@@
- [[file:posts/career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">2026-03-11 17:20</span>@@
- [[file:posts/career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">2026-03-11 17:19</span>@@
- [[file:posts/career/restful-api.org][Restful API]] @@html:<span class="post-date">2026-03-08 17:37</span>@@
- [[file:blogs/2026/03-march/fixing-the-dag-18-03.org][DAG fixes]] @@html:<span class="post-date">2026-03-18 15:01</span>@@
- [[file:blogs/2026/03-march/feeling-sleepy.org][Feeling extremely sleepy]] @@html:<span class="post-date">2026-03-16 16:18</span>@@
- [[file:blogs/2026/03-march/oversleeping-16-03.org][Oversleeping and missing a meeting...]] @@html:<span class="post-date">2026-03-16 11:21</span>@@
- [[file:blogs/2026/03-march/15-03-week-review.org][[15-03-2026] - Weekly Review]] @@html:<span class="post-date">2026-03-15 12:00</span>@@
- [[file:posts/career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">2026-03-11 17:18</span>@@
- [[file:posts/career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">2026-03-11 16:52</span>@@
- [[file:home/status.org][Competency Status Board]] @@html:<span class="post-date">2026-03-08 16:28</span>@@
- [[file:blogs/2026/02-february/27-02-26.org][Journeys rambles again...]] @@html:<span class="post-date">2026-03-07 16:33</span>@@
- [[file:blogs/2026/03-march/01-03-week-review.org][[01-03-2026] - Weekly Review]] @@html:<span class="post-date">2026-03-07 12:45</span>@@
- [[file:posts/career/database-permissions.org][Database Permissions, Roles, and Accounts]] @@html:<span class="post-date">2026-03-05 13:06</span>@@
- [[file:posts/career/monitoring-and-logging.org][Monitoring and Logging]] @@html:<span class="post-date">2026-03-05 12:58</span>@@
- [[file:posts/career/pipelines.org][Pipelines and how they work (as well as CI/CD)]] @@html:<span class="post-date">2026-03-05 11:52</span>@@
- [[file:blogs/2026/02-february/third-meeting.org][Third Meeting with lima :)]] @@html:<span class="post-date">2026-03-03 12:02</span>@@
- [[file:blogs/2026/02-february/22-02-week-review.org][[22-02-2026] - Weekly Review]] @@html:<span class="post-date">2026-02-27 17:07</span>@@
- [[file:blogs/2026/02-february/26-02-26.org][Starting the Journeys Upgrade]] @@html:<span class="post-date">2026-02-26 17:37</span>@@
- [[file:blogs/2026/02-february/24-02-26.org][Integration tests failing (sob)]] @@html:<span class="post-date">2026-02-24 17:00</span>@@
- [[file:home/backlog.org][Backlog]] @@html:<span class="post-date">2026-02-23 16:40</span>@@
- [[file:blogs/2026/02-february/15-02-week-review.org][[15-02-2026] - Weekly Review]] @@html:<span class="post-date">2026-02-23 10:02</span>@@
- [[file:blogs/2026/03-march/08-03-week-review.org][[08-03-2026] - Weekly Review]] @@html:<span class="post-date">2026-03-08 12:00</span>@@
- [[file:blogs/2026/03-march/01-03-week-review.org][[01-03-2026] - Weekly Review]] @@html:<span class="post-date">2026-03-01 12:00</span>@@
- [[file:blogs/2026/02-february/27-02-26.org][Journeys rambles again...]] @@html:<span class="post-date">2026-02-27 17:12</span>@@
- [[file:blogs/2026/02-february/26-02-26.org][Starting the Journeys Upgrade]] @@html:<span class="post-date">2026-02-26 17:32</span>@@
- [[file:blogs/2026/02-february/24-02-26.org][Integration tests failing (sob)]] @@html:<span class="post-date">2026-02-24 16:55</span>@@
- [[file:blogs/2026/02-february/22-02-week-review.org][[22-02-2026] - Weekly Review]] @@html:<span class="post-date">2026-02-22 12:00</span>@@
- [[file:posts/career/restful-api.org][Restful API]] @@html:<span class="post-date">2026-02-15 23:00</span>@@
- [[file:blogs/2026/02-february/15-02-week-review.org][[15-02-2026] - Weekly Review]] @@html:<span class="post-date">2026-02-15 12:00</span>@@
- [[file:home/services.org][Service]] @@html:<span class="post-date">2026-02-11 13:26</span>@@
- [[file:blogs/2026/02-february/08-02-week-review.org][[08-02-2026] - Weekly Review]] @@html:<span class="post-date">2026-02-11 12:20</span>@@
- [[file:blogs/2026/02-february/08-02-week-review.org][[08-02-2026] - Weekly Review]] @@html:<span class="post-date">2026-02-08 12:00</span>@@
- [[file:blogs/2026/02-february/third-meeting.org][Third Meeting with lima :)]] @@html:<span class="post-date">2026-02-01 12:00</span>@@
- [[file:blogs/2026/02-february/01-02-week-review.org][[01-02-2026] - Weekly Review]] @@html:<span class="post-date">2026-02-01 12:00</span>@@
- [[file:blogs/2026/01-january/25-01-week-review.org][[25-01-2026] - Weekly Review]] @@html:<span class="post-date">2026-01-25 12:00</span>@@
- [[file:posts/career/pipelines.org][Pipelines and how they work (as well as CI/CD)]] @@html:<span class="post-date">2026-01-18 23:00</span>@@
- [[file:posts/career/monitoring-and-logging.org][Monitoring and Logging]] @@html:<span class="post-date">2026-01-18 23:00</span>@@
- [[file:posts/career/database-permissions.org][Database Permissions, Roles, and Accounts]] @@html:<span class="post-date">2026-01-18 23:00</span>@@

View File

@@ -1,115 +1,101 @@
;;; recently-updated.el --- Generate recently-updated.org -*- lexical-binding: t; -*-
;;; recently-updated.el --- Generate recently-updated.org -*- lexical-binding: t; -*-
;;; Commentary:
;; Generates home/recently-updated.org listing the N most recently touched
;; Org files in the site tree.
;;
;; Sort order: #+DATE if parseable, otherwise file modification time.
;; This means intentionally dated pages float correctly, while undated
;; pages fall back to when they were last touched on disk.
;;
;; NOTE: Do NOT define `site-root' here. build-site.el owns that definition.
;;; Code:
(require 'cl-lib)
(require 'org)
(defvar site-root
(file-name-directory
(or load-file-name buffer-file-name)))
(defvar z-org-root
(file-name-as-directory site-root)
"Root directory of the Org source files.")
;; ── Omit predicate ────────────────────────────────────────────────────────────
(defconst z/recent-omit-names
'("sitemap.org"
"categories.org"
"recently-updated.org"
"wip.org")
"Org files that are always excluded from the recently-updated list.")
;; Which Org files should be skipped for Recently Updated
(defun z/recent-omit-org-p (rel-org)
"Return non-nil if REL-ORG (relative to `z-org-root`) should not be listed."
(let* ((name (file-name-nondirectory rel-org)))
"Return non-nil if REL-ORG (relative to site root) should be excluded."
(let ((name (file-name-nondirectory rel-org)))
(or
;; assets-ish / tags
;; Static asset directories
(string-prefix-p "assets/" rel-org)
(string-match-p "/assets/" rel-org)
(string-match-p "/assets/" rel-org)
;; Tag pages
(string-prefix-p "tags/" rel-org)
(string-match-p "/tags/" rel-org)
;; generated/meta orgs
(member name '("sitemap.org"
"categories.org"
"recently-updated.org"
"wip.org"
))
;; any *-list.org sitemaps (posts-list.org, blogs-list.org, etc.)
(string-match-p "/tags/" rel-org)
;; Known generated files
(member name z/recent-omit-names)
;; Any *-list.org sitemaps
(string-match-p "-list\\.org\\'" name))))
(defun z/read-org-title+mtime (file)
"Return (TITLE . MTIME) for Org FILE.
;; ── Metadata reader ───────────────────────────────────────────────────────────
TITLE from #+TITLE or file name.
MTIME is the file's modification time (real 'last updated')."
(with-temp-buffer
(insert-file-contents file)
(org-mode)
(let* ((props (org-collect-keywords '("TITLE")))
(title-cell (assoc "TITLE" props))
(title (or (and title-cell
(car (cdr title-cell)))
(file-name-base file)))
(mtime (nth 5 (file-attributes file))))
(cons title mtime))))
(defun z/read-org-title+date (file)
(defun z/read-org-meta (file)
"Return (TITLE . TIME) for Org FILE.
TITLE:
- from #+TITLE, or file-name if missing.
TIME:
- from #+DATE if parseable as an org time string,
- otherwise from file's modification time."
TITLE: from #+TITLE, or file-name-base when absent.
TIME : from #+DATE (parsed as an Org time string) when present and
parseable; otherwise falls back to the file's modification time.
Using #+DATE ensures intentionally-dated content sorts by its
canonical publication date rather than an accidental disk mtime."
(with-temp-buffer
(insert-file-contents file)
(org-mode)
(let* ((props (org-collect-keywords '("TITLE" "DATE")))
;; TITLE
(title-cell (assoc "TITLE" props))
(title (or (and title-cell
(car (cdr title-cell)))
(file-name-base file)))
;; DATE
(date-cell (assoc "DATE" props))
(date-str (and date-cell
(car (cdr date-cell))))
(time (or (and date-str
(ignore-errors
(org-time-string-to-time date-str)))
(nth 5 (file-attributes file)))))
(let* ((props (org-collect-keywords '("TITLE" "DATE")))
(title (or (cadr (assoc "TITLE" props))
(file-name-base file)))
(date-str (cadr (assoc "DATE" props)))
(time (or (and date-str
(ignore-errors
(org-time-string-to-time date-str)))
(file-attribute-modification-time
(file-attributes file)))))
(cons title time))))
(defun z/generate-recently-updated-org (&optional n)
"Generate recently-updated.org in `z-org-root`.
;; ── Generator ────────────────────────────────────────────────────────────────
Lists top N most recently updated Org pages
(excluding tags, sitemaps, *-list.org, etc).
Defaults to N=30."
(let* ((count (or n 30))
(org-files (directory-files-recursively z-org-root "\\.org\\'"))
(items '()))
;; Collect (REL PATH, TITLE, TIME)
(dolist (full org-files)
(let ((rel (file-relative-name full z-org-root)))
(defun z/generate-recently-updated-org (&optional n)
"Write home/recently-updated.org listing the top N recently updated files.
N defaults to 30. Returns the number of entries written."
(let* ((count (or n 30))
(org-root (file-name-as-directory z/site-root))
(all-files (directory-files-recursively org-root "\\.org\\'"))
(items '()))
;; Collect (REL TITLE TIME)
(dolist (full all-files)
(let ((rel (file-relative-name full org-root)))
(unless (z/recent-omit-org-p rel)
(pcase-let* ((`(,title . ,time) (z/read-org-title+mtime full)))
(pcase-let ((`(,title . ,time) (z/read-org-meta full)))
(push (list rel title time) items)))))
;; Sort newest first by TIME
(setq items
(sort items
(lambda (a b)
(time-less-p (nth 2 b) (nth 2 a)))))
;; Trim
;; Sort newest first
(setq items (sort items (lambda (a b) (time-less-p (nth 2 b) (nth 2 a)))))
;; Trim to N
(setq items (cl-subseq items 0 (min count (length items))))
;; Write Org file
;; Write Org
(with-temp-file (site-path "home/recently-updated.org")
(insert "#+TITLE: Recently Updated\n"
"#+OPTIONS: toc:nil num:nil\n\n"
"* Recently Updated (top 26 files - per lima's request)\n")
(format "* Recently Updated (top %d files)\n" (length items)))
(dolist (it items)
(let* ((rel (nth 0 it))
(title (nth 1 it))
(time (nth 2 it))
(let* ((rel (nth 0 it))
(title (nth 1 it))
(time (nth 2 it))
(datestr (format-time-string "%Y-%m-%d %H:%M" time)))
(insert (format "- [[file:%s][%s]] @@html:<span class=\"post-date\">%s</span>@@\n"
rel title datestr))))))
(message "Wrote recently-updated.org"))
rel title datestr)))))
(length items)))
(provide 'recently-updated)
;;; recently-updated.el ends here

View File

@@ -1,26 +1,40 @@
;;; sidenotes.el --- Sidenote / no-sidenotes helpers -*- lexical-binding: t; -*-
;;; Commentary:
;; Predicates for deciding whether a page should render with sidenotes.
;; Loaded by build-site.el via (require 'sidenotes).
;;
;; NOTE: Do NOT define `site-root' here. build-site.el owns that definition.
;;; Code:
(defun z/no-sidenotes-file-p (file)
"Return non-nil if FILE should be rendered without sidenotes.
A file is no-sidenotes if:
- It has a #+NO_SIDENOTES: keyword, or
- Its FILETAGS contain :NO_SIDENOTES: or :KANBAN:, or
- Any top-level heading contains \"KANBAN\"."
A file suppresses sidenotes when any of the following is true:
- It has a #+NO_SIDENOTES: keyword with a non-empty value.
- Its FILETAGS contain :NO_SIDENOTES: or :KANBAN:.
- Any top-level heading contains the word \"KANBAN\" (case-insensitive)."
(when (file-exists-p file)
(with-temp-buffer
(insert-file-contents file)
(org-mode)
(let* ((case-fold-search t)
(keywords (org-collect-keywords
'("NO_SIDENOTES" "FILETAGS")))
(keywords (org-collect-keywords '("NO_SIDENOTES" "FILETAGS")))
(flag (cadr (assoc "NO_SIDENOTES" keywords)))
(filetags (cadr (assoc "FILETAGS" keywords))))
(filetags (cadr (assoc "FILETAGS" keywords))))
(or
;; Explicit keyword present with any non-whitespace value
(and flag (string-match-p "\\S-" flag))
;; Tag-based suppression
(and filetags
(string-match-p
":\\(NO_SIDENOTES\\|KANBAN\\):"
(concat ":" filetags ":")))
(string-match-p ":\\(NO_SIDENOTES\\|KANBAN\\):"
(concat ":" filetags ":")))
;; Heading-based suppression
(save-excursion
(goto-char (point-min))
(re-search-forward "^\\*+ .*KANBAN.*" nil t)))))))
(provide 'sidenotes)
;;; sidenotes.el ends here

View File

@@ -1,473 +1,310 @@
(defvar site-root
(file-name-directory
(or load-file-name buffer-file-name)))
;;; sitemaps.el --- Sitemap generators for org-publish -*- lexical-binding: t; -*-
(defun site-path (path)
(expand-file-name path site-root))
;;; Commentary:
;; Custom :sitemap-function implementations for each publishing project.
;;
;; NOTE: Do NOT define `site-root' here. build-site.el owns that definition.
;;; Code:
(require 'cl-lib)
(require 'org)
;; ─────────────────────────────────────────────────────────────────────────────
;; Internal helpers
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/sitemap--tag-html (tags-raw)
"Convert a raw FILETAGS string into an Org-mode HTML inline tag list.
Returns an empty string when TAGS-RAW is nil or blank."
(if (and tags-raw (string-match-p "\\S-" tags-raw))
(mapconcat
(lambda (tag)
(format "@@html:<a href=\"/tags/%s.html\"><span class=\"post-tag\">%s</span></a>@@"
tag tag))
(split-string tags-raw ":" t)
" ")
""))
(defun z/sitemap--entry-data (link base-dir)
"Extract (FULL-PATH DATE-STR TAGS-STR) for a sitemap ENTRY under BASE-DIR.
LINK is the raw [[file:...][...]] string produced by org-publish."
(let* ((filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename base-dir))
(date (and (file-exists-p full-path)
(org-publish-find-date full-path org-publish-project-alist)))
(date-str (if date (format-time-string "%d-%m-%Y %H:%M" date) "no date"))
(tags-raw (and (file-exists-p full-path)
(with-temp-buffer
(insert-file-contents full-path)
(org-mode)
(cadr (assoc "FILETAGS"
(org-collect-keywords '("FILETAGS"))))))))
(list full-path date-str (z/sitemap--tag-html tags-raw) date)))
(defun z/sitemap--flat-list (title list base-dir section-title categories-rel)
"Render a flat bullet-point sitemap.
TITLE — org-publish title string
LIST — the raw list from org-publish (car is root node)
BASE-DIR — absolute path to the project's :base-directory
SECTION-TITLE — heading text, e.g. \"Posts\"
CATEGORIES-REL — relative path to categories.html from this project root"
(concat
"#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil\n\n"
(format "See the categories: @@html:<a href=\"%s\">Categories</a>@@\n\n" categories-rel)
"* " section-title "\n"
(mapconcat
(lambda (entry)
(when (consp entry)
(let* ((link (car entry))
(data (z/sitemap--entry-data link base-dir))
(date-str (nth 1 data))
(tags-str (nth 2 data)))
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s"
link date-str tags-str))))
(cdr list)
"\n")))
;; ─────────────────────────────────────────────────────────────────────────────
;; Posts
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/posts-sitemap (title list)
"sitemap that lists post links as bullet points with dates and tags."
(concat
"#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil \n\n"
"See the categories: @@html:<a href=\"../home/categories.html\">Categories</a>@@\n\n"
"* Posts:\n"
(mapconcat
(lambda (entry)
(let* ((link (car entry))
;; extract relative file name from the link
(filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename (site-path "posts/")))
(date-str "no date")
(tags-str ""))
;; Get publish date
(let ((date (org-publish-find-date full-path org-publish-project-alist)))
(when date
(setq date-str (format-time-string "%d-%m-%Y %H:%M" date))))
;; Get FILETAGS from file buffer
(when (file-exists-p full-path)
(with-temp-buffer
(insert-file-contents full-path)
(org-mode)
(let* ((tags (cadr (assoc "FILETAGS" (org-collect-keywords '("FILETAGS"))))))
(when tags
(setq tags-str (mapconcat (lambda (tag)
(format "@@html:<a href=\"/tags/%s.html\"> <span class=\"post-tag\">%s</span> </a>@@" tag tag))
(split-string tags ":" t) ;; <- Splits by ":" and removes empty strings
" "))))))
;; Final line output
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s" link date-str tags-str)))
(cdr list)
"\n")))
"Flat sitemap for org-posts."
(z/sitemap--flat-list title list
(site-path "posts/")
"Posts:"
"../home/categories.html"))
;; ─────────────────────────────────────────────────────────────────────────────
;; Blogs — flat (kept for compatibility, not used as default)
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/blogs-sitemap (title list)
"sitemap that lists blog links as bullet points with dates and tags."
(concat
"#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil \n\n"
"See the categories: @@html:<a href=\"../home/categories.html\">Categories</a>@@\n\n"
"* Blogs:\n"
(mapconcat
(lambda (entry)
(let* ((link (car entry))
;; extract relative file name from the link
(filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename (site-path "blogs/")))
(date-str "no date")
(tags-str ""))
;; Get publish date
(let ((date (org-publish-find-date full-path org-publish-project-alist)))
(when date
(setq date-str (format-time-string "%d-%m-%Y %H:%M" date))))
;; Get FILETAGS from file buffer
(when (file-exists-p full-path)
(with-temp-buffer
(insert-file-contents full-path)
(org-mode)
(let* ((tags (cadr (assoc "FILETAGS" (org-collect-keywords '("FILETAGS"))))))
(when tags
(setq tags-str (mapconcat (lambda (tag)
(format "@@html:<a href=\"/tags/%s.html\"> <span class=\"post-tag\">%s</span> </a>@@" tag tag))
(split-string tags ":" t) ;; <- Splits by ":" and removes empty strings
" "))))))
;; Final line output
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s" link date-str tags-str)))
(cdr list)
"\n")))
"Flat sitemap for org-blogs (use z/blogs-grouped-sitemap for the default)."
(z/sitemap--flat-list title list
(site-path "blogs/")
"Blogs:"
"../home/categories.html"))
;; ─────────────────────────────────────────────────────────────────────────────
;; Blogs — grouped by year → month
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/blogs-grouped-sitemap (title list)
"Sitemap grouped by year and month with dates and FILETAGS."
"Sitemap for org-blogs grouped by year and month, newest first."
(let ((data (make-hash-table :test 'equal)))
;; STEP 1: Collect entries into (year -> month -> entries)
;; Collect into year-key → month-key → list of (link date-str tags-str time)
(dolist (entry (cdr list))
(when (consp entry)
(let* ((link (car entry))
(filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename (site-path "blogs/")))
(date (when (file-exists-p full-path)
(org-publish-find-date full-path org-publish-project-alist))))
(let* ((link (car entry))
(ed (z/sitemap--entry-data link (site-path "blogs/")))
(full-path (nth 0 ed))
(date-str (nth 1 ed))
(tags-str (nth 2 ed))
(time (nth 3 ed)))
(when time
(let* ((year (format-time-string "%Y" time))
(month (format-time-string "%B %Y" time))
(year-table (or (gethash year data)
(puthash year (make-hash-table :test 'equal) data))))
(puthash month
(cons (list link date-str tags-str time)
(gethash month year-table))
year-table))))))
(when date
(let* ((year (format-time-string "%Y" date))
(month (format-time-string "%B %Y" date))
(date-str (format-time-string "%d-%m-%Y %H:%M" date))
(tags-str ""))
;; Get tags
(when (file-exists-p full-path)
(with-temp-buffer
(insert-file-contents full-path)
(org-mode)
(let ((tags (cadr (assoc "FILETAGS"
(org-collect-keywords '("FILETAGS"))))))
(when tags
(setq tags-str
(mapconcat
(lambda (tag)
(format "@@html:<a href=\"/tags/%s.html\"> \
<span class=\"post-tag\">%s</span> </a>@@" tag tag))
(split-string tags ":" t)
" "))))))
;; Insert into hash table
(let ((year-table (or (gethash year data)
(puthash year (make-hash-table :test 'equal) data))))
(let ((month-list (gethash month year-table)))
(puthash month
(cons (list link date-str tags-str date)
month-list)
year-table))))))))
;; STEP 2: Render output
(let ((output (concat
"#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil \n\n"
"See the categories: @@html:<a href=\"../home/categories.html\">Categories</a>@@\n\n")))
;; Sort years descending
;; Render
(let ((output (concat "#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil\n\n"
"See the categories: @@html:<a href=\"../home/categories.html\">Categories</a>@@\n\n")))
(dolist (year (sort (hash-table-keys data) #'string>))
(setq output (concat output "* " year "\n"))
(let ((year-table (gethash year data)))
;; Sort months by actual date (descending)
(dolist (month
(sort (hash-table-keys year-table)
(lambda (a b)
(time-less-p
(date-to-time (concat "01 " b))
(date-to-time (concat "01 " a))))))
(dolist (month (sort (hash-table-keys year-table)
(lambda (a b)
(time-less-p
(date-to-time (concat "01 " b))
(date-to-time (concat "01 " a))))))
(setq output (concat output "\n** " month "\n"))
;; Sort entries by date descending
(dolist (entry
(sort (gethash month year-table)
(lambda (a b)
(time-less-p (nth 3 b) (nth 3 a)))))
(let ((link (nth 0 entry))
(date-str (nth 1 entry))
(tags-str (nth 2 entry)))
(setq output
(concat output
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s\n"
link date-str tags-str))))))))
(dolist (entry (sort (gethash month year-table)
(lambda (a b)
(time-less-p (nth 3 b) (nth 3 a)))))
(setq output
(concat output
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s\n"
(nth 0 entry)
(nth 1 entry)
(nth 2 entry))))))))
output)))
;; ─────────────────────────────────────────────────────────────────────────────
;; Books
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/books-sitemap (title list)
"sitemap that lists books."
(concat
"#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil \n\n"
"See the categories: @@html:<a href=\"../home/categories.html\">Categories</a>@@\n\n"
"* Book Notes:\n"
(mapconcat
(lambda (entry)
(let* ((link (car entry))
;; extract relative file name from the link
(filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename (site-path "books/")))
(date-str "no date")
(tags-str ""))
;; Get publish date
(let ((date (org-publish-find-date full-path org-publish-project-alist)))
(when date
(setq date-str (format-time-string "%d-%m-%Y %H:%M" date))))
;; Get FILETAGS from file buffer
(when (file-exists-p full-path)
(with-temp-buffer
(insert-file-contents full-path)
(org-mode)
(let* ((tags (cadr (assoc "FILETAGS" (org-collect-keywords '("FILETAGS"))))))
(when tags
(setq tags-str (mapconcat (lambda (tag)
(format "@@html:<a href=\"/tags/%s.html\"> <span class=\"post-tag\">%s</span> </a>@@" tag tag))
(split-string tags ":" t) ;; <- Splits by ":" and removes empty strings
" "))))))
;; Final line output
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s" link date-str tags-str)))
(cdr list)
"\n")))
"Flat sitemap for org-books."
(z/sitemap--flat-list title list
(site-path "books/")
"Book Notes:"
"../home/categories.html"))
;; ─────────────────────────────────────────────────────────────────────────────
;; Year-scoped sitemaps (generic helper)
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/year-grouped-sitemap (title list year base-dir categories-rel)
"Generic year-scoped, month-grouped sitemap.
YEAR is a string like \"2025\". BASE-DIR is the project root.
CATEGORIES-REL is the relative href to categories.html."
(let ((output (concat "#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil\n\n"
(format "See the categories: @@html:<a href=\"%s\">Categories</a>@@\n\n"
categories-rel)
"* " year "\n"))
(current-month nil))
(dolist (entry (cdr list))
(when (consp entry)
(let* ((link (car entry))
(ed (z/sitemap--entry-data link base-dir))
(date-str (nth 1 ed))
(tags-str (nth 2 ed))
(time (nth 3 ed))
(month-str (if time (format-time-string "%B %Y" time) "No date")))
(unless (equal month-str current-month)
(setq current-month month-str)
(setq output (concat output "\n** " month-str "\n")))
(setq output
(concat output
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s\n"
link date-str tags-str))))))
output))
(defun z/2025-sitemap (title list)
"Sitemap that lists 2025 posts grouped by month, with dates and FILETAGS."
(let ((output (concat
"#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil \n\n"
"See the categories: @@html:<a href=\"../../home/categories.html\">Categories</a>@@\n\n"
"* 2025\n"))
(current-month nil))
;; `list` is what org-publish passes in; we skip its car (top-level title node)
(dolist (entry (cdr list))
;; In this setup each ENTRY is usually (LINK . OTHER-STUFF)
(when (consp entry)
(let* ((link (car entry))
;; Extract relative filename from the [[file:...][...]] link
(filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename (site-path "blogs/2025/")))
(date (when (file-exists-p full-path)
(org-publish-find-date full-path org-publish-project-alist)))
(date-str (if date
(format-time-string "%d-%m-%Y %H:%M" date)
"no date"))
(month-str (if date
(format-time-string "%B %Y" date) ; e.g. "August 2025"
"No date"))
(tags-str ""))
;; Collect FILETAGS from the file
(when (file-exists-p full-path)
(with-temp-buffer
(insert-file-contents full-path)
(org-mode)
(let ((tags (cadr (assoc "FILETAGS"
(org-collect-keywords '("FILETAGS"))))))
(when tags
(setq tags-str
(mapconcat
(lambda (tag)
(format "@@html:<a href=\"/tags/%s.html\"> \
<span class=\"post-tag\">%s</span> </a>@@" tag tag))
(split-string tags ":" t)
" "))))))
;; Insert month heading whenever month changes
(unless (equal month-str current-month)
(setq current-month month-str)
(setq output (concat output "\n** " month-str "\n")))
;; Insert the actual entry
(setq output
(concat output
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s\n"
link date-str tags-str))))))
output))
"Sitemap for blogs/2025/ grouped by month."
(z/year-grouped-sitemap title list "2025"
(site-path "blogs/2025/")
"../../home/categories.html"))
(defun z/2026-sitemap (title list)
"Sitemap that lists 2026 blogs grouped by month, with dates and FILETAGS."
(let ((output (concat
"#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil \n\n"
"See the categories: @@html:<a href=\"../../home/categories.html\">Categories</a>@@\n\n"
"* 2026\n"))
(current-month nil))
(dolist (entry (cdr list))
(when (consp entry)
(let* ((link (car entry))
(filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename (site-path "blogs/2026/")))
(date (when (file-exists-p full-path)
(org-publish-find-date full-path org-publish-project-alist)))
(date-str (if date
(format-time-string "%d-%m-%Y %H:%M" date)
"no date"))
(month-str (if date
(format-time-string "%B %Y" date)
"No date"))
(tags-str ""))
(when (file-exists-p full-path)
(with-temp-buffer
(insert-file-contents full-path)
(org-mode)
(let ((tags (cadr (assoc "FILETAGS"
(org-collect-keywords '("FILETAGS"))))))
(when tags
(setq tags-str
(mapconcat
(lambda (tag)
(format "@@html:<a href=\"/tags/%s.html\"> \
<span class=\"post-tag\">%s</span> </a>@@" tag tag))
(split-string tags ":" t)
" "))))))
(unless (equal month-str current-month)
(setq current-month month-str)
(setq output (concat output "\n** " month-str "\n")))
(setq output
(concat output
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s\n"
link date-str tags-str))))))
output))
"Sitemap for blogs/2026/ grouped by month."
(z/year-grouped-sitemap title list "2026"
(site-path "blogs/2026/")
"../../home/categories.html"))
;; ─────────────────────────────────────────────────────────────────────────────
;; Career
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/career-sitemap (title list)
"Sitemap that lists careers posts grouped by month, with dates and FILETAGS."
(let ((output (concat
"#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil \n\n"
"See the categories: @@html:<a href=\"../../home/categories.html\">Categories</a>@@\n\n"
"See the following page for more details: @@html:<a href=\"./career-intro.html\">Career Intro</a>@@\n"
))
(current-month nil))
(dolist (entry (cdr list))
(when (consp entry)
(let* ((link (car entry))
(filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename (site-path "posts/career/")))
(date (when (file-exists-p full-path)
(org-publish-find-date full-path org-publish-project-alist)))
(date-str (if date
(format-time-string "%d-%m-%Y %H:%M" date)
"no date"))
(month-str (if date
(format-time-string "%B %Y" date) ; e.g. "August 2025"
"No date"))
(tags-str ""))
(when (file-exists-p full-path)
(with-temp-buffer
(insert-file-contents full-path)
(org-mode)
(let ((tags (cadr (assoc "FILETAGS"
(org-collect-keywords '("FILETAGS"))))))
(when tags
(setq tags-str
(mapconcat
(lambda (tag)
(format "@@html:<a href=\"/tags/%s.html\"> \
<span class=\"post-tag\">%s</span> </a>@@" tag tag))
(split-string tags ":" t)
" "))))))
;; Insert month heading whenever month changes
(unless (equal month-str current-month)
(setq current-month month-str)
(setq output (concat output "\n** " month-str "\n")))
(setq output
(concat output
(format "- %s @@html:<span class=\"post-date\">%s</span>@@ %s\n"
link date-str tags-str))))))
output))
"Sitemap for posts/career/ grouped by month."
(concat
(z/year-grouped-sitemap title list ""
(site-path "posts/career/")
"../../home/categories.html")
"\nSee the following page for more details: @@html:<a href=\"./career-intro.html\">Career Intro</a>@@\n"))
;; ─────────────────────────────────────────────────────────────────────────────
;; Categories
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/categories-sitemap (title _list)
"Generate a categories page by scanning tags across org-posts and org-blogs."
"Generate a categories overview by scanning tags across posts and blogs."
(let* ((expanded (org-publish-expand-projects org-publish-project-alist))
(posts (assoc "org-posts" expanded))
(blogs (assoc "org-blogs" expanded))
;; DO NOT set :exclude to "" — it excludes everything
(files (cl-remove-duplicates
(append (and posts (org-publish-get-base-files posts))
(and blogs (org-publish-get-base-files blogs)))
:test #'file-equal-p))
;; optional: drop the generated sitemaps
(files (cl-remove-if
(lambda (f)
(member (file-name-nondirectory f)
'("posts-list.org" "blogs-list.org" "sitemap.org" "categories.org")))
files))
(counts (make-hash-table :test 'equal)))
;;(message "files I will scan: %S" files)
(files (cl-remove-if
(lambda (f)
(member (file-name-nondirectory f)
'("posts-list.org" "blogs-list.org"
"sitemap.org" "categories.org")))
(cl-remove-duplicates
(append (and posts (org-publish-get-base-files posts))
(and blogs (org-publish-get-base-files blogs)))
:test #'file-equal-p)))
(counts (make-hash-table :test 'equal)))
(dolist (f files)
(when (file-readable-p f)
(with-temp-buffer
(insert-file-contents f)
(org-mode)
(let* ((kw (org-collect-keywords '("FILETAGS" "TAGS")))
(raw (car (or (cdr (assoc "FILETAGS" kw))
(cdr (assoc "TAGS" kw))))))
(let* ((kw (org-collect-keywords '("FILETAGS" "TAGS")))
(raw (cadr (or (assoc "FILETAGS" kw)
(assoc "TAGS" kw)))))
(when raw
(dolist (tag (split-string raw ":" t))
(puthash tag (1+ (gethash tag counts 0)) counts)))))))
(let (tags)
(maphash (lambda (k _) (push k tags)) counts)
(setq tags (sort tags #'string-lessp))
(concat
"#+TITLE: " title "\n#+OPTIONS: toc:nil num:nil title:nil\n\n* Categories (Includes both blogs and posts)\n"
"#+TITLE: " title "\n#+OPTIONS: toc:nil num:nil title:nil\n\n"
"* Categories (Includes both blogs and posts)\n"
(if tags
(mapconcat
(lambda (tag)
(format "- [[file:../tags/%s.org][@@html:<span class=\"post-tag\">%s</span>@@]] (%d)"
(z/tag-slug tag) tag (gethash tag counts))
)
tags
"\n")
(mapconcat
(lambda (tag)
(format "- [[file:../tags/%s.org][@@html:<span class=\"post-tag\">%s</span>@@]] (%d)"
(z/tag-slug tag) tag (gethash tag counts)))
tags
"\n")
"_No tags found yet._")))))
;; ─────────────────────────────────────────────────────────────────────────────
;; WIP sitemap
;; ─────────────────────────────────────────────────────────────────────────────
(defun z/wip-file-p (file)
"Return non-nil if FILE should be treated as WIP.
A file is WIP if:
- It has a #+WIP: keyword with any non-empty value, or
- Its FILETAGS contain :WIP:, or
- Any top-level heading contains the string \"WIP\" (case-insensitive)."
"Return non-nil if FILE is marked as work-in-progress.
A file is WIP when any of the following is true:
- It has a #+WIP: keyword with a non-empty value.
- Its FILETAGS contain :WIP:.
- Any top-level heading contains \"WIP\" (case-insensitive)."
(when (file-exists-p file)
(with-temp-buffer
(insert-file-contents file)
(org-mode)
(let* ((case-fold-search t)
(keywords (org-collect-keywords '("WIP" "FILETAGS")))
(wip (cadr (assoc "WIP" keywords)))
(wip (cadr (assoc "WIP" keywords)))
(filetags (cadr (assoc "FILETAGS" keywords))))
(or
(and wip (string-match-p "\\S-" wip))
(and filetags
(string-match-p ":WIP:" (concat ":" filetags ":")))
(and filetags (string-match-p ":WIP:" (concat ":" filetags ":")))
(save-excursion
(goto-char (point-min))
(re-search-forward "^\\*+ .*WIP.*" nil t)))))))
(defun z/wip-sitemap (title list)
"Sitemap that lists only entries whose source files are WIP."
(let* ((items
(delq
nil
(mapcar
(lambda (entry)
(when (consp entry)
(let* ((link (car entry))
(filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename site-root)))
(when (z/wip-file-p full-path)
(let* ((date (org-publish-find-date full-path org-publish-project-alist))
(date-str (if date
(format-time-string "%d-%m-%Y %H:%M" date)
"")))
(format "- %s @@html:<span class=\"post-date\">%s</span>@@"
link date-str))))))
(cdr list))))) ;; skip sitemap root
(concat
"#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil\n\n"
"* Work in progress\n"
(if items
(mapconcat #'identity items "\n")
"No items currently marked as WIP.\n"))))
"Sitemap listing only entries whose source files are marked WIP."
(let ((items
(delq nil
(mapcar
(lambda (entry)
(when (consp entry)
(let* ((link (car entry))
(filename (if (string-match "\\[\\[file:\\([^]]+\\)\\]" link)
(match-string 1 link)
link))
(full-path (expand-file-name filename z/site-root)))
(when (z/wip-file-p full-path)
(let* ((date (org-publish-find-date full-path org-publish-project-alist))
(date-str (if date
(format-time-string "%d-%m-%Y %H:%M" date)
"")))
(format "- %s @@html:<span class=\"post-date\">%s</span>@@"
link date-str))))))
(cdr list)))))
(concat "#+TITLE: " title "\n"
"#+OPTIONS: toc:nil num:nil\n\n"
"* Work in progress\n"
(if items
(mapconcat #'identity items "\n")
"No items currently marked as WIP.\n"))))
(provide 'sitemaps)
;;; sitemaps.el ends here

View File

@@ -1,10 +1,26 @@
;;; tags.el --- Tag index and HTML helpers -*- lexical-binding: t; -*-
;;; Commentary:
;; Collects FILETAGS from posts/blogs, generates tags/*.org pages, and
;; injects tag HTML into exported pages.
;;
;; NOTE: Do NOT define `site-root' here. build-site.el owns that definition.
;;; Code:
(require 'cl-lib)
(require 'org)
;; ── Slug ─────────────────────────────────────────────────────────────────────
(defun z/tag-slug (s)
"Turn a tag into a safe filename."
(let ((down (downcase s)))
(replace-regexp-in-string "[^a-z0-9]+" "-" down)))
"Return a URL-safe filename slug for tag S."
(replace-regexp-in-string "[^a-z0-9]+" "-" (downcase s)))
;; ── File collection ───────────────────────────────────────────────────────────
(defun z/collect-post-files ()
"Return all .org files from org-posts and org-blogs."
"Return all .org source files from the org-posts and org-blogs projects."
(let* ((expanded (org-publish-expand-projects org-publish-project-alist))
(posts (assoc "org-posts" expanded))
(blogs (assoc "org-blogs" expanded)))
@@ -13,66 +29,79 @@
(and blogs (org-publish-get-base-files blogs)))
:test #'file-equal-p)))
;; ── Tag index ─────────────────────────────────────────────────────────────────
(defconst z/generated-org-names
'("posts-list.org" "blogs-list.org" "sitemap.org" "categories.org"
"recently-updated.org" "wip.org")
"Generated Org files that should never be indexed for tags.")
(defun z/gather-tag-index ()
"Return hash: tag -> list of (FILE TITLE DATE-ISO)."
"Return a hash-table mapping tag -> list of (FILE TITLE DATE-ISO)."
(let ((idx (make-hash-table :test 'equal)))
(dolist (f (z/collect-post-files))
(when (and (string-match-p "\\.org\\'" f)
(file-readable-p f)
;; ignore generated lists
(not (member (file-name-nondirectory f)
'("posts-list.org" "blogs-list.org" "sitemap.org" "categories.org"))))
z/generated-org-names)))
(with-temp-buffer
(insert-file-contents f)
(org-mode)
(let* ((kw (org-collect-keywords '("TITLE" "FILETAGS" "TAGS" "DATE")))
(title (or (car (cdr (assoc "TITLE" kw)))
(file-name-base f)))
(date (or (car (cdr (assoc "DATE" kw))) "")) ;; optional
(raw (car (or (cdr (assoc "FILETAGS" kw))
(cdr (assoc "TAGS" kw))))))
(let* ((kw (org-collect-keywords '("TITLE" "FILETAGS" "TAGS" "DATE")))
(title (or (cadr (assoc "TITLE" kw)) (file-name-base f)))
(date (or (cadr (assoc "DATE" kw)) ""))
(raw (cadr (or (assoc "FILETAGS" kw)
(assoc "TAGS" kw)))))
(when raw
(dolist (tag (split-string raw ":" t))
(push (list f title date) (gethash tag idx))))))))
idx))
;; ── Tag page writer ───────────────────────────────────────────────────────────
(defun z/write-tag-pages ()
"Generate tags/*.org pages listing posts for each tag."
(let* ((site-root (expand-file-name "~/master-folder/org_files/org_web/"))
(tags-dir (expand-file-name "tags" site-root)))
"Generate tags/*.org pages, one per tag.
Returns the number of tag pages written."
(let* ((tags-dir (site-path "tags/"))
(idx (z/gather-tag-index))
(count 0))
(unless (file-directory-p tags-dir)
(make-directory tags-dir t))
(let ((idx (z/gather-tag-index)))
(maphash
(lambda (tag items)
(let* ((slug (z/tag-slug tag))
(outfile (expand-file-name (format "%s.org" slug) tags-dir)))
(with-temp-file outfile
(insert (format "#+TITLE: Tag: %s\n#+OPTIONS: toc:nil num:nil title:nil \n\n* Posts tagged %s\n"
tag tag))
;; sort newest first if DATE present
(setq items (sort items (lambda (a b) (string> (nth 2 a) (nth 2 b)))))
(dolist (it items)
(let* ((file (nth 0 it))
(title (nth 1 it))
(rel (file-relative-name file tags-dir)))
;; link to the source .org; org-publish will rewrite to the .html
(insert (format "- [[file:%s][%s]]\n" rel title)))))))
idx)
)))
(maphash
(lambda (tag items)
(let* ((slug (z/tag-slug tag))
(outfile (expand-file-name (format "%s.org" slug) tags-dir)))
(with-temp-file outfile
(insert (format "#+TITLE: Tag: %s\n#+OPTIONS: toc:nil num:nil title:nil\n\n* Posts tagged %s\n"
tag tag))
;; Sort newest first
(setq items (sort items (lambda (a b) (string> (nth 2 a) (nth 2 b)))))
(dolist (it items)
(let* ((file (nth 0 it))
(title (nth 1 it))
(rel (file-relative-name file tags-dir)))
(insert (format "- [[file:%s][%s]]\n" rel title)))))
(cl-incf count)))
idx)
count))
;; ── HTML tag rendering ────────────────────────────────────────────────────────
(defun z/filetags-html (info)
"Return an HTML snippet for FILETAGS from INFO, or nil if none."
"Return an HTML <div class=\"filetags\"> snippet from export INFO, or nil."
(let ((tags (plist-get info :filetags)))
(when tags
(format
"<div class=\"filetags\">%s</div>\n"
(mapconcat (lambda (tag)
(format "<a href=\"/home/categories.html\"> <span class=\"post-tag\">%s</span> </a>" tag))
tags " ")))))
(mapconcat
(lambda (tag)
(format "<a href=\"/home/categories.html\"><span class=\"post-tag\">%s</span></a>"
tag))
tags
" ")))))
(defun z/insert-filetags-after-title (output backend info)
"Insert FILETAGS after the first <h1 class=\"title\"> in OUTPUT."
"Insert FILETAGS HTML after the first <h1 class=\"title\"> in OUTPUT."
(if (org-export-derived-backend-p backend 'html)
(let ((block (z/filetags-html info)))
(if (and block
@@ -81,5 +110,6 @@
output))
output))
(provide 'tags)
;;; tags.el ends here

File diff suppressed because it is too large Load Diff

View File

@@ -3,34 +3,36 @@
See the categories: @@html:<a href="../../home/categories.html">Categories</a>@@
See the following page for more details: @@html:<a href="./career-intro.html">Career Intro</a>@@
*
** March 2026
- [[file:ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
** February 2026
- [[file:restful-api.org][Restful API]] @@html:<span class="post-date">15-02-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:restful-api.org][Restful API]] @@html:<span class="post-date">15-02-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
** January 2026
- [[file:database-permissions.org][Database Permissions, Roles, and Accounts]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:monitoring-and-logging.org][Monitoring and Logging]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:pipelines.org][Pipelines and how they work (as well as CI/CD)]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:database-permissions.org][Database Permissions, Roles, and Accounts]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:monitoring-and-logging.org][Monitoring and Logging]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:pipelines.org][Pipelines and how they work (as well as CI/CD)]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
** December 2025
- [[file:probation-objectives.org][Probation Objectives:]] @@html:<span class="post-date">08-12-2025 17:55</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:probation-objectives.org][Probation Objectives:]] @@html:<span class="post-date">08-12-2025 17:55</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
** November 2025
- [[file:airflow.org][Datamarts, Airflow and DAG's]] @@html:<span class="post-date">15-11-2025 18:37</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:normalisation.org][Benefits of Normalisation]] @@html:<span class="post-date">10-11-2025 18:04</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:management-of-self.org][Management of self training]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:wireframe-designs.org][Wireframe Designs]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:requirements-features.org][Requirements, features, user stories, tasks, walking skeletons]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career-intro.org][Career Introduction]] @@html:<span class="post-date">06-11-2025 21:29</span>@@ @@html:<a href="/tags/introduction.html"> <span class="post-tag">introduction</span> </a>@@
- [[file:invest-principles.org][Invest Principles]] @@html:<span class="post-date">06-11-2025 21:08</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:retrospectives.org][Retrospectives]] @@html:<span class="post-date">05-11-2025 20:46</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:lean.org][Lean]] @@html:<span class="post-date">05-11-2025 20:46</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:airflow.org][Datamarts, Airflow and DAG's]] @@html:<span class="post-date">15-11-2025 18:37</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:normalisation.org][Benefits of Normalisation]] @@html:<span class="post-date">10-11-2025 18:04</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:management-of-self.org][Management of self training]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:wireframe-designs.org][Wireframe Designs]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:requirements-features.org][Requirements, features, user stories, tasks, walking skeletons]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career-intro.org][Career Introduction]] @@html:<span class="post-date">06-11-2025 21:29</span>@@ @@html:<a href="/tags/introduction.html"><span class="post-tag">introduction</span></a>@@
- [[file:invest-principles.org][Invest Principles]] @@html:<span class="post-date">06-11-2025 21:08</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:retrospectives.org][Retrospectives]] @@html:<span class="post-date">05-11-2025 20:46</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:lean.org][Lean]] @@html:<span class="post-date">05-11-2025 20:46</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
** October 2025
- [[file:owasp.org][OWASP Top Ten]] @@html:<span class="post-date">19-10-2025 13:21</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:solid-principles.org][SOLID Principles]] @@html:<span class="post-date">18-10-2025 19:14</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:owasp.org][OWASP Top Ten]] @@html:<span class="post-date">19-10-2025 13:21</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:solid-principles.org][SOLID Principles]] @@html:<span class="post-date">18-10-2025 19:14</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
See the following page for more details: @@html:<a href="./career-intro.html">Career Intro</a>@@

View File

@@ -4,23 +4,23 @@
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
* Posts:
- [[file:career/career-list.org][Career List]] @@html:<span class="post-date">19-03-2026 16:17</span>@@
- [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/restful-api.org][Restful API]] @@html:<span class="post-date">15-02-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/database-permissions.org][Database Permissions, Roles, and Accounts]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/monitoring-and-logging.org][Monitoring and Logging]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/pipelines.org][Pipelines and how they work (as well as CI/CD)]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/probation-objectives.org][Probation Objectives:]] @@html:<span class="post-date">08-12-2025 17:55</span>@@ @@html:<a href="/tags/review.html"> <span class="post-tag">review</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/airflow.org][Datamarts, Airflow and DAG's]] @@html:<span class="post-date">15-11-2025 18:37</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/normalisation.org][Benefits of Normalisation]] @@html:<span class="post-date">10-11-2025 18:04</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/management-of-self.org][Management of self training]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/wireframe-designs.org][Wireframe Designs]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/requirements-features.org][Requirements, features, user stories, tasks, walking skeletons]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/career-intro.org][Career Introduction]] @@html:<span class="post-date">06-11-2025 21:29</span>@@ @@html:<a href="/tags/introduction.html"> <span class="post-tag">introduction</span> </a>@@
- [[file:career/invest-principles.org][Invest Principles]] @@html:<span class="post-date">06-11-2025 21:08</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/retrospectives.org][Retrospectives]] @@html:<span class="post-date">05-11-2025 20:46</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/lean.org][Lean]] @@html:<span class="post-date">05-11-2025 20:46</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/owasp.org][OWASP Top Ten]] @@html:<span class="post-date">19-10-2025 13:21</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/solid-principles.org][SOLID Principles]] @@html:<span class="post-date">18-10-2025 19:14</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:posts-intro.org][Posts Introduction]] @@html:<span class="post-date">06-08-2025 00:00</span>@@ @@html:<a href="/tags/introduction.html"> <span class="post-tag">introduction</span> </a>@@
- [[file:career/career-list.org][Career List]] @@html:<span class="post-date">20-03-2026 23:53</span>@@
- [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/restful-api.org][Restful API]] @@html:<span class="post-date">15-02-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/database-permissions.org][Database Permissions, Roles, and Accounts]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/monitoring-and-logging.org][Monitoring and Logging]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/pipelines.org][Pipelines and how they work (as well as CI/CD)]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/probation-objectives.org][Probation Objectives:]] @@html:<span class="post-date">08-12-2025 17:55</span>@@ @@html:<a href="/tags/review.html"><span class="post-tag">review</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/airflow.org][Datamarts, Airflow and DAG's]] @@html:<span class="post-date">15-11-2025 18:37</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/normalisation.org][Benefits of Normalisation]] @@html:<span class="post-date">10-11-2025 18:04</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/management-of-self.org][Management of self training]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/wireframe-designs.org][Wireframe Designs]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/requirements-features.org][Requirements, features, user stories, tasks, walking skeletons]] @@html:<span class="post-date">06-11-2025 22:01</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/career-intro.org][Career Introduction]] @@html:<span class="post-date">06-11-2025 21:29</span>@@ @@html:<a href="/tags/introduction.html"><span class="post-tag">introduction</span></a>@@
- [[file:career/invest-principles.org][Invest Principles]] @@html:<span class="post-date">06-11-2025 21:08</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/retrospectives.org][Retrospectives]] @@html:<span class="post-date">05-11-2025 20:46</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/lean.org][Lean]] @@html:<span class="post-date">05-11-2025 20:46</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/owasp.org][OWASP Top Ten]] @@html:<span class="post-date">19-10-2025 13:21</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:career/solid-principles.org][SOLID Principles]] @@html:<span class="post-date">18-10-2025 19:14</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
- [[file:posts-intro.org][Posts Introduction]] @@html:<span class="post-date">06-08-2025 00:00</span>@@ @@html:<a href="/tags/introduction.html"><span class="post-tag">introduction</span></a>@@

View File

@@ -40,13 +40,13 @@
- [[file:tags/learning.org][Tag: learning]]
- [[file:tags/notes.org][Tag: notes]]
- [[file:tags/review.org][Tag: review]]
- [[file:tags/insights.org][Tag: insights]]
- [[file:tags/life.org][Tag: life]]
- [[file:tags/website.org][Tag: website]]
- [[file:tags/emacs.org][Tag: emacs]]
- [[file:tags/education.org][Tag: education]]
- [[file:tags/reading.org][Tag: reading]]
- [[file:tags/insights.org][Tag: insights]]
- [[file:tags/emacs.org][Tag: emacs]]
- [[file:tags/maths.org][Tag: maths]]
- [[file:tags/reading.org][Tag: reading]]
- home
- [[file:home/countdown.org][Countdown]]
- [[file:home/contact.org][Contact]]