refactor to use handlebars template. refactor to use /blog/* to work with gh-pages. minor refactors to re-use the rendering logic