This blog used to run on Wordpress. It’s a great CMS that tend to get better and better with time. But I wanted something simpler. So I switched to Hexo. This is a static website generator. With a some interesting advantages:
- Because it’s all static pages, it’s really fast. When you add some plugins to wordpress it may become slow. With Hexo, you generate all the content on your computer, then you ship it and it will become fully static HTML pages.
- There is no “CMS” part with a text editor and assets management. I write posts in Markdown directly in the _posts folder, put images in the images folder, generate the website and synchronize the result. It may seem ridiculous for a basic user. But for a developer, it’s actually faster.
- I just needed something dead simple for the template. I could build this in less than an hour.
- It can be all managed with version control.
Well actually, the switch was really short because I have very few articles, and because they were originally written in Markdown. And my wordpress blog used to have disqus comment that can be embed with a few line of js.
Other options?
Actually, it did not take me only one hour because I tried other generators before. Metalsmith and Punch are great too, but they offers too many options and plugins and are not focused on getting you ready fast. I just wanted an article list page and articles. And I already know that I did not want Assemble
If you follow the command to get started, you’ll be up and running in a minute:
$ npm install hexo-cli -g
$ hexo init blog
$ cd blog
$ npm install
$ hexo server
For the rest, the doc is great
If you want to see how this one is build, feel free to fork or download it on github. Then npm install and hexo server in the folder.
Should you use it?
If you need something with many options and possibilities, probably not. But I bet you are using an overkill solution.
If you are looking for performances, static sites are the right thing to do.
If you just want a simple blog that you want to host ie: not ghost or medium, this is definitely something you want to try.