The Hexo Blog Framework

An old quote says: “With a new server comes a new website”. Inspired by this I started the search for a new blog framework. For my old blog I used WordPress and I don’t think it’s bad but too blown up with thousands of features I don’t need. No the mention the higher vulnerability coming up with such a big code base.

I wanted a simple and fast blog that’s set up easily and has built in syntax highlighting for code as a bonus.

While searching for WordPress alternatives I found this new trend of markdown powered blog software that generates plain HTML files. I really love the idea behind this.
Markdown files can be written fast and everywhere with a simple editor. They also let you add code into the post without extra work. The other big advantage of this concept is that a static HTML website is not vulnerable at all and there is no work for the web server.

After some more digging and comparing I chose Hexo.
This won’t be a tutorial on setting up and using Hexo because it is indeed as simple as stated on the website. After five commands your Hexo node.js server is running and can be used while developing and writing posts. Hexo also includes a simple way to deploy posts to the web server.
Hexo has a nice collection of themes that can be found here. Installing one of them is even simpler. I installed Apollo and adjusted it a little bit to fit my taste.

One thing that I could not find was a fully functional search. So I wrote one, more infos can be found here.

Other possibly interesting stuff

I will also use this to post some findings about hexo that are possibly interesting.

skip_render

In the post here I included source files for the first time. I put some javascript files in the source/downloads/code directory, but everytime I generated the blog that files also where processed and got completely destroyed.

After some very long searching I found the skip_render option in the _config.yml. With that option it is possible to skip the rendering for all files in the downloads directory so they just get copied to the public folder.

1
2
skip_render:
- downloads/**