From e136d6671654561ac24fa98792442829339a639e Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Thu, 12 Feb 2026 20:30:22 -0600 Subject: publish-new-post: automating-weblorg-deployments (#4) * publish new post: automating-weblorg-deployments * fix publish.el comments * allow for case-insensitive env variable * obfuscate port * update run rules * update run rules * allow for case-insensitive env variable * publish new post: automating-weblorg-deployments --- publish.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'publish.el') diff --git a/publish.el b/publish.el index 3399715..7f2b4be 100644 --- a/publish.el +++ b/publish.el @@ -1,10 +1,11 @@ ;;; -*- lexical-binding: t -*- -;; Explicitly load packages for Doom Emacs +;; Allow for macOS (dev machine) & Linux (GitHub Actions) execution (defvar site-lisp-base (if (eq system-type 'darwin) - "~/.config/emacs/.local/straight/repos" ; macOS path + "~/.config/emacs/.local/straight/repos" ; macOS path "/home/linuxbrew/.config/emacs/.local/straight/repos")) ; CI/Linux path +;; Explicitly load packages (add-to-list 'load-path (expand-file-name "htmlize" site-lisp-base)) (add-to-list 'load-path (expand-file-name "weblorg" site-lisp-base)) (add-to-list 'load-path (expand-file-name "templatel" site-lisp-base)) @@ -13,10 +14,11 @@ (require 'weblorg) ;; Set default URL for Weblorg -(if (string= (getenv "ENV") "prod") +;; Only works if environment variable ENV=prod +(if (string-equal-ignore-case (or (getenv "ENV") "") "prod") (setq weblorg-default-url "https://cleberg.net")) -;; Define site configuration +;; Define site metadata (weblorg-site :theme nil :template-vars '(("site_name" . "cleberg.net") -- cgit v1.2.3