To celebrate one full month of blogging, I have written a function that will post the HTML and Org files that comprise each day's blog entry automatically with Midnight, as seen earlier this month.
(defun mak::fasciism-post-daily-blog () "Posts daily blog in HTML and Org format to respective GitHub repos." ;; Publish the project to ensure the HTML file is on disk. (org-publish-project "fasciism" t) ;; Set up the common one-liner to publish a file. (let ((cmd (string-join '("cd %s" "git add %s-*.%s" "git commit -m 'Daily blog post.'" "git push") " && ")) (date (format-time-string "%F"))) ;; Publish the HTML file. (let ((file (format "_posts/%s" date))) (shell-command (format cmd "~/src/fasciism" file "html") "*fasciism-blog-post::html*")) ;; Publish the Org file. (shell-command (format cmd "~/.emacs.d" date "org") "*fasciism-blog-post::org*"))) (add-hook 'midnight-mode 'mak::fasciism-post-daily-blog)
And with that, we've made it! An entire month sticking to the built-in features of Emacs and using it every day. Tomorrow I will lift that self-imposed restriction and dive into the wide world of packages.