updated the makefile, added new org files (2026), and started working on adding a search feature for the website.

This commit is contained in:
2025-12-30 22:43:25 +00:00
parent 78cfe20d64
commit c15fcda8c6
20 changed files with 4007 additions and 33 deletions

View File

@@ -171,6 +171,61 @@
output))
(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=\"../../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
"~/master-folder/org_files/org_web/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))
(defun z/career-sitemap (title list)
"Sitemap that lists careers posts grouped by month, with dates and FILETAGS."
@@ -183,12 +238,9 @@
))
(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))
@@ -205,7 +257,6 @@
"No date"))
(tags-str ""))
;; Collect FILETAGS from the file
(when (file-exists-p full-path)
(with-temp-buffer
(insert-file-contents full-path)
@@ -226,7 +277,6 @@
(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"