Since the beginning of this blogs existence I been using Jekyll, and I decided to fully switch over. After using Middleman for both Throw the Project, I found Middleman to be better for a few good reasons:
- Can use native erb / slim / haml. This is the biggest reason
- Very easy to write helper functions, no need to mess with Liquid tags.
- Auto reload is very nice and quick. Jekyll’s doesn’t work as well.
- Better config, it’s all in Ruby rather than jekylls annoying yml file structure.
- Plenty of convenient time saving plugins. Like image optimizer, html minify, sitemaper.
- Has a built in /__middleman/config endpoint for debugging and optimizing site. For example I can see a list of all the pages which will be generated.
Overall Middleman gives me more freedom by letting me use plain Ruby, and whatever gems I like, I can be more productive.
This bash script lets you see which blog posts don’t have matching dates in the metadatas. Middleman will crash if they don’t match.
echo 'puts Dir["**/*.md"].select{|i| a, b = [File.read(i)[/date: "?(\d\d\d\d-\d\d-\d\d)/, 1], i[/\/(\d\d\d\d-\d\d-\d\d)/, 1] ]; a != b }' | ruby
I decided to remove the Disqus comments for now and will be replacing it with an open-source solution in the future.