Social media is a bummer, so I shout into the Web using this site instead.
I maintained a slightly less minimalist blog built on Pico CMS for a few years, and decided I wanted to move operations to a new site that would incorporate improvements I’d been wanting to make. They were:
At the same time, I wanted to learn more about:
I wound up inadvertently learning more about:
git reset --hard
)This site is put together by essentially writing my own CMS using Markdown, shell and Python scripts, and Ansible. The workflow for creating new content is:
This design obviously doesn’t scale well, as re-generating and copying all content for a big, fancy, commerical web site would be time-consuming and error-prone. But, at the scale of this website, it’s:
I could have opted to build all the site’s content locally and deploy it to an S3 bucket. That would eliminate the need for managing a platform, web server, and transport security layer all together. As those things are of personal and professional interest, though, that seemed too easy.
Discovered the headache of HTML entity codes. This happened when I found that HTML that came out of my Markdown file -> Multimarkdown -> HTML file -> BeautifulSoup -> HTML file pipeline contained a munged apostrophe (“'”) in it. The work-around was to grab a string-version of a BeautifulSoup object, perform a re.sub()
on it to add the header I wanted, convert it back into BeautifulSoup, then write it out as a byte-encoded string with f.write(soup.encode('latin-1'))
.
Renewed my appreciation for atomic operations. Ansible’s idempotent approach to things is great, but you run into trouble when your remote directory structure has files in it that you’ve deleted in your local copy.
Having an off-the-shelf CMS is really convenient! Much of the point of this exercise was to learn how much of a chore it is to run a website. Mission accomplished.