In Memory

The Simple Way To Keep Thoughts

I'm @sstude, I'm a software developer. This is my blog where I post (sometimes :) notes about my dev life. Follow me on Twitter and don't hesitate to ask any questions or share any interesting ideas!

Blog Projects Twitter Github

A while ago I moved to a new blog engine for this blog. As you may know there are a lot of static site generators available today. The previous one I'd used was Octopress. Octopress is the very nice engine, it has a lot of features and could be easily installed on Windows or OS X.

But it uses Ruby under the hood. That may be good if you know Ruby but that was not for me. I didn't developed anything on Ruby so, when I wanted to extend smth. it was complicated. Also I was looking for a generator based on NodeJS.

Google gave me this cool site - You can find a lot of static site generators there, by any criteria you wish.

My choice is Metalsmith - An extremely simple, pluggable static site generator.

Playing a bit I found that it could be easily extended. Despite you can find a lot of existing plugins you can write your own and do everything you want with files, metadata, urls, etc.

I've created a simple project that could be used as a bootstrap for your new Metalsmith blog -

Here is the structure:

- src/
-- _posts/
- ...
- templates/
-- partials/
- ...
- build.js
- server.js

Two important files here are build.js and server.js. First one could be run as node build.js - compiles your static files and generates the output. The second one will run a local node server - just enter node server.js in your console.

Feel free to use it in your projects and blogs.

That's it. I've configured Metalsmith to build this blog and deployed it to github :)

Read more