caddy-hugo2: new blog software
Thu, Sep 7, 2017I’m working on a plugin to caddy that hooks in hugo with a more tailored interface than its predecessor. The code is at: git.stephensearles.com/stephen/caddy-hugo2. I wrote a bit about why I chose to do this on the blog it was originally meant for, danandstephen.net, but I’m going to elaborate a little more here.
The thought process went roughly like this:
The requirements:
- Easy for me and my partner to manage and edit
- This means it needs to be GUI/web friendly with a WYSIWYG feel to the authoring
- Needs to support pictures, RSS, and basic blogging features
- Reasonably secure. This isn’t a bank blog, or anything, but at least not obviously vulnerable to like a light breeze.
- Low power; I want this to run on a cheap virtual server.
- Nice to have: written in Go, making it extra cheap and also easy for me to hack around on
Okay, so what choices are available?
- Blogger, medium: proprietary and not self-hosted. Those can be fine choices for people without some of the more custom options, but I think I can do better.
- Wordpress: huge and difficult to secure. I’ve been down that road plenty, so let’s not use that…
- Drupal, etc: huge, unfamiliar to me, and still not static (as far as I understand), and so the cost to run it sounds like it’d be an issue at some modest scale
- Jekyll, ghost, etc: static! But now we’re getting into the world of developer focused systems where the GUI is a question
- hugo … this is a static site generator written in Go. I have enjoyed it before, so using this would be nice. There’s even a plugin for an interface into caddy! .. Unfortunately, that plugin’s interface doesn’t provide any niceties for a WYSIWYG experience at all. It’s basically a wrapper around a file manager. … So what if I could replace that?
My thought process brought me about this far and I figured I’d give it a shot to link up hugo with a web WYSIWYG-ish markdown editor, contained in a new caddy plugin. It’s not just a good fit for our needs, either. I think this plugin bridges caddy and its goal of being a simple webserver for technical and non-technical people alike to publish on the web. It reduces the friction to getting accessible CMS features under a modern and automatic HTTPS server.
A few months and a few thousand miles later, me and my partner have been able to use it to host our Farm and Adventure blog. The project is coming along nicely. It’s got, so far:
- author overview page
- collaborative editing (deltas syncing via websocket)
- draft presentation alongside the edit screen
- image upload and serving, with on-the-fly resizing
- comments, optionally guarded by a low-security password
- definitely a few bugs
I’m going to keep working on it, but the source is already available if anyone else wants to try it, hack on it, or just watch.