April 18th 2026 - Things I Worked On
Added 4th level heading styling to blog
Added styling for 4th level headings. Org export doesn't add a special class or html element for this level of heading so I had to do some css magic to make sure that just the heading is a different color.
.outline-4 > ul > li { color: #fea7d8; } .outline-4 > ul > li > *{ color: white; }
Added a function to publish my blog
I want to automate some of my blogging so I've added a function to publish my blog.
;; -*- lexical-binding: t -*- (defun my/blog-publish () "Publish blog" (interactive) (message "Publishing blog...") (let ((local-dir my/blog-local-directory) (remote-dir my/blog-remote-directory)) (async-start (lambda () (shell-command-to-string (format "rsync -av --delete %s %s" (shell-quote-argument local-dir) (shell-quote-argument remote-dir)))) (lambda (result) (message (string-trim result))))))
In order to use (setq) vars in the async lambdas we need to use (let) to declare locally scoped variables. Otherwise, the function will fail to read the values.
Using this function requires 2 variables to use:
- my/blog-remote-directory - The directory where you want to publish your blog.
- my/blog-local-directory - The directory holding your local blog files.
Notice the trailing / as this is needed for full directory synchronization. I'll try to find a better solution in the future in case I forget to add the trailing /:
(setq my/blog-remote-directory "user@remote:/path/to/remote/directory/") (setq my/blog-local-directory (expand-file-name "~/website/blog/"))
The publishing function uses rsync so if your blog is on a remote server you can point it like this:
user@yoursite:/path/to/your/blog/