Blogging with hugo
All hail markdown⌗
First off: I love the idea of markdown. It’s a simple format that just works and is adopted everywhere on the web these days. The best thing about it is that it’s easily readable, both on the web and on the terminal. As I’m a coder and I’m not too much into web-design, I can just rely on cool people that know how to make stuff look good on the web and just focus on the content.
I know people that would roll their eyes if they could see me typing this blogpost in vim - but in a world where everybody and their grandma starts a new file format I couldn’t be happier: My content won’t be hidden away in some database, obscured with a bunch of html tags, custom fields for tags, titles, and creation dates - and if I’ll want to move to a different blogging system, I will easily be able to salvage my previous content, because, well, it’s the most basic format there is: Plain text.
I write my notes in Markdown, even on my phone - and recently I switched to managing my todos with org mode (even though I didn’t make the jump to emacs - vim orgmode will do for now). Using a simple text format enables me to be completely free in my choice of editors and I just know it will work on every platform.
Then I started thinking about a blog. So I looked around for a platform that won’t lock me down into its ecosystem, and will work with markdown. And since this is my first blog post, I found it fitting to make it about what I use to pubish it. Enter hugo.
I won’t explain how to set it up, as the hugo page does a great job of explaining it.
Hugo is a static site generator written in go. Now maybe that sounds boring, but it has some advantages over, say, a wordpress installation:
Written in go⌗
Hugo is written in go. I’m beginning to like stuff written in go, as it gets delivered in a single binary that just works on the command line. After you’ve installed hugo to somewhere inside your path-variable, you can run it from everywhere to create a new site-directory, choose a theme and then create a “public” directory that you can feed into your webserver of choice to serve your website.
Easily themeable⌗
You can choose from a plethora of themes, and switching the theme won’t break your content. Go to hugos theme list for a great selection. Thanks to radek for the great terminal theme I’m using on my blog!
No web-backend⌗
While it might sound like a downside to some, I really really love not having a web-backend. I don’t want to serve another website that has a log-in page, a bunch of customization options and whatnot. I like simplicity and since I’m using hugo to generate the site, I don’t have to rely on php or other tools to generate my site on the go. I don’t have to click through a bunch of settings - I configure it on the cli and in plain text, as I’m used to.
The best part about it is: I don’t even have to install hugo on my webserver. Basically I can install it on my laptop, preview my posts locally, and when I’m done, i run hugo -D
, which generates the “public” folder containing a bunch of html files and publish them on my webserver.
You can just easily be aware of what you’re putting on the web, as it’s only some html files.
You won’t have to worry about any security flaws of wordpress, or whatever blogging software you use - it just works.
No dependencies aside from a webserver.
Runner up to my choice of hugo was pelican but I have to admit: I didn’t want to spend too much time on setting my site up and it was just way easier for me to get started with hugo.
If you’re into simplicity, I can only suggest you give hugo a try!