When this site was first reborn, my goal was to create a direct, simple path between the act of writing and my work showing up on the site. I had been using WordPress for most of my sites, but it was becoming increasingly difficult to use, with a plethora of features that, at best, got in the way of simply writing what I had to say and, at worst, threw a bunch of extras at the poor reader who was just trying to read. I began to dread writing an essay or observation, fearing that I’d just encounter new features in my content management platform that would distract (or even obstruct) me from my task or burden my readers with more cruft.

I thought about just using plain text — which I do for email whenever possible — but I actually really like to be able to emphasize things occasionally (see what I did there?).

I decided I wanted to work in Markdown which is almost plain text, but allows some simple formatting, links, and inline images. For example, this sentence in Markdown looks like this:

I decided I wanted to work in [Markdown](https://en.wikipedia.org/wiki/Markdown) 
which is _almost_ plain text, but allows some simple formatting, links, and 
inline images. For example, this sentence in Markdown looks like this:

I found a static site generator (Quartz) which would take my Markdown scribbing and convert it to HTML that is then hosted on a simple web site. In theory, all I had to do was to open my favorite text editor, disgorge a column, and upload it to the web server.

Of course, there’s always nuance and the actual process is a bit more involved, but it proceeds in a predictable, orderly way which has become part of a ritual. That ritual seems to calm and focus my brain so that, instead of being an impediment, improves my writing.

It goes like this: on the server, there’s a file called template.md in the same directory as all the other Markdown files that represent twoprops.net’s columns. For the Linux geeks, template.md is rendered immutable using the command sudo chattr +i template.md — otherwise, I am 100% certain to forget to rename it and thus overwrite my template with my new column.

To get started, I open my text editor. Currently, that’s Kate on my Framework laptop running Fedora. It could be any text editor, though, from vim in the web server’s shell to the awesome BBEdit if I happen to be on a macOS machine. Generally, Kate will have two files already open in tabs: index.md (the home page for twoprops.net) and the .md file for the most recent column.

Then I open template.md and start editing. I’m presented with a file that looks like this:

---
title: titleGoesHere
description: descriptionGoesHere
aliases:
tags:
  - automobile
  - cancer
  - healthcare
  - home
  - island
  - Luna
  - meta
  - observation
  - parenting
  - pool
  - recipe
  - recommendation
  - retirement
  - sysadmin
  - travel
  - verse
  - why-we-can't-have-nice-things
  - writing
draft: true
date: 2024-03-10
---


--2p

[[index|← previous]]|[[theend|next →]]

The first thing to do, assuming I don’t forget, is to Save As... and give the new column a name. I then replace titleGoesHere with a title, usually pretty similar to the file name. descriptionGoesHere gets replaced with a (usually) one sentence description of what the column is going to be about. Then I delete all the tags that I don’t think will apply, change the draft: field to false, and update the date. I then change the word index in the “previous” link at the bottom to the name of the last column I published. I generally hit save at this point and, if I forgot to change the file name when I started, I get an error and must make the name change now.

I next click on the tab for the last-published column, and change the theend in the “next” link at the bottom to the name of the new column. I can now close the last-published-column tab.

The penultimate task is to click on the index.md tab and add the latest column to the index list.

While it’s a bit of a ritual, it doesn’t require a lot of thought (file name? description? what tags apply?) and it goes really quickly. Now I’m ready — both with my editor layouts and in my brain — to actually write.

After I have emitted a new, scorchingly brilliant column, there are still a few things to do such as prepare and upload any images I want to use.

To actually publish, I sign onto my server and launch Quartz. Actually, I launch a small bash script that launches Quartz, then loops to look for any file changes and runs Quartz again if there is any new or changed content. This, because I almost always make mistakes or at least think of changes I want to make once I see a column in published form.

#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

LTIME=0
site="twoprops.net"
dir="/home/twoprops/quartz"

while true
do
   ATIME=`stat -c %Z $dir/content`
   if [[ "$ATIME" != "$LTIME" ]]
   then
       echo
       echo "-- $(date +%Y%m%d@%H:%M) $site --"
       cd $dir
       npx quartz build
       LTIME=$ATIME
   fi
   sleep 5
done

Shortly after I’ve published, I usually look at the column in a web browser and a couple of different RSS readers just to make sure the rendering is what I intended.

All written out like this, it doesn’t seem short or simple, but it has a mindless repetitiveness with just enough need for thought to keep me engaged. An excellent meditation and preparation for writing.

—2p

← previous|next →