Why does this site-exist? Yet Another Personal Website

Why?

I used to blog many years ago using ikiwiki. I liked the idea of a static blog that could be generated from git. I don't particular care for markdown. I prefer org-mode. Family, life, work, the universe all conspired leaving me with little time to blog. I have decided, that I need to start blogging again. I didn't want to use markdown, I didn't want to use any of the static site generators. I keep my life already in org, and org roam, so I'd thought I'd just try to build a site with (org-publish) and see what happens.

Constraints

  • I didn't want a framework.
  • I didn't want javascript.
  • I already spend most of my day in Emacs and org-mode, that would be the least frictionless way for me to move from not blogging to blogging….

It started simply

The original structure:

jr0.dev/
|--- css/
|--- pages/
|--- posts
|--- index.org

Org's publishing machinery seemed like more than enough.

It was. Mostly. Then it wasn't.

Rabbit holes

What is fun of working on a project, if there aren't a couple (or plethora) of rabbit holes to explore along the way.

I wanted a 3 column layout.

I abstracted the header into its own file:

<header class="site-header">
  <div class="site-title">jr0.dev</div>
  <div class="site-tagline">Question everything.</div>
</header>

<nav class="site-nav">
  <a href="index.html">Home</a>
  <a href="pages/about.html">About</a>
</nav>

and wrote a function:

(defun jr/prepare-pages (plist)
  (message "In the prepare pages.")
  (message "base: %S" (plist-get plist :base-directory))
  (message "html-divs: %S" (plist-get plist :html-divs))
  (message "content-class: %S" (plist-get plist :html-content-class))
  (let ((header (concat
                 (file-name-as-directory
                  (plist-get plist :base-directory))
                 "header.html")))
    (message header)
    (when (file-exists-p header)
      (with-temp-buffer
        (insert-file-contents header)
        (buffer-string)))))

Why?

I've been meaning to resurrect a personal site for …

…

Question everything

The tagline for the site is:

Question everything. Especially this.

…

Some constraints

I didn't want a framework.

I didn't want Javascript.

I wanted the source to be plain text and live in Git.

I already spend most of my life in Emacs and Org mode, so …

It started simply

The original structure was:

jr0.dev/
├── css/
├── pages/
├── posts/
└── index.org

Org's publishing machinery seemed like more than enough.

It was. Mostly.

Down the rabbit hole

All I wanted was a three-column layout…

…

Then Org helpfully closed my div.

…

Then I produced:

<nil id="nil" class="status">

This seemed suboptimal.

Of course, it's Lisp

Eventually the problem reduced to modifying the CONTENTS argument passed to `org-html-template`.

Rather than copying and maintaining Org's HTML template, Emacs gives me advice…

(advice-add 'org-html-template
            :filter-args
            #'jr/html-wrap-content)

…

This is becoming something else

At some point this stopped being an org-publish configuration and started becoming a very small site generator.

…

What's next?

…

hah