









For some time now I’ve been unhappy with how much more friction there is when posting to my blog[1] than posting to twitter[2]. I keep wanting to blog more but I don’t. Part of the problem is content. I did blog more in 2018, when I was working on projects that had more to share. Part of the problem is expectations. On Twitter it’s expected that I write very little (280 character limit, up to 4 images or 1 animation). That constraint makes it easier to post. On my blog I tend to write longer more involved posts. But part of the problem is the process. My posts on Twitter take a lot less effort than my posts on Blogger. The Blogger UI got a lot worse in 2020[3], but it was already inconvenient for me.
So I’ve been thinking about what I actually want, and what I want isn’t Twitter or Blogger. I want something much closer to Hugo or Jekyll — a static site generator. I want to be able to save a file and have it become a blog post. I want to be able to grep over my existing files. I want to be able to write a perl script to fix something across pages. I decided a goal in 2024 is to switch from Blogspot to a static site generator.
But when I looked at Hugo and Jekyll I started thinking of more things I wanted. In particular, I want to integrate into the rest of my site, which isn’t Markdown, but instead a messy mix of technologies that I’ve worked with over the past nearly 30 years of having a web site. I already have a static site generator. I use Emacs Org-Mode instead of Markdown. Hugo does support Org-Mode[4], and Org-Mode has a way to publish posts[5], and there are Org-Mode blogging packages[6]. But I don’t always use Org-Mode. I sometimes use Markdown. I sometimes use XHTML. And I sometimes use other formats. Also I have my own templating system based on XSLT. So either:
But what is actually involved in writing my own blog software? I already have the markup and templating and comments. What’s missing is:
Of these, I already want to add browse by category and browse by date to the rest of the site, so the main thing I need to add is an Atom/RSS feed and a home page listing the posts.
Well, I decided to try it.
“How hard could it be?” → famous last words, right? I’ll see how it goes. I’m using python-feedgen[7] and ElementTree[8], and I think it will be around 200 lines of Python code to implement the blog, assuming nothing goes wrong.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。