A while back I wrote about a revamp to the how my site was deployed. Naturally, I’m a tinkerer, and I couldn’t resist making more changes. Hexo is a really nice website scaffolding, but there’s a lot to it. If I wanted to get in and mess around I had to do a lot of digging. I wanted to have a better understanding of how things were constructed.

I’ve been working for a long while on a node based server/generator called Clive that not only generates a site, but gives you an admin interface for editing and publishing files. It also has the ability to queue up posts for automatic posting and generation. I spent some time away from it, and just don’t love it. It’s another thing that just does too much.

So for the past week or so I’ve been all over the internet trying to figure out how I want to build this website in a way that makes it easy for my to share and write the way I want to. I finally settled on what I find to be the simplest process; setting up a Gulp build & deploy system.

At some point in the near future I’ll open source it (and Clive for that matter). But for now the basics of my setup are this…

  • All posts and pages and whatever else I might create are written in markdown
  • Content is stored in two folders, called published and drafts (mostly for ease in combing through and editing files)
  • Actual published state is stored via a boolean value in the front matter
  • I have a couple of tasks which will sort through the markdown files and move any out of place files into their correct directory
  • Site is generated with handlebars templates. It’s not great but in order to keep links to previous posts from breaking I’ve set up redirect pages with meta tags which send you to the proper location.
  • Styles are in a single less file that’s compiled to css during the build

My next task is to use nodegit to automate deploying to Github pages. I know, I could write more if I spent less time tinkering, but I want to do some of both. I’m hoping I’ll be happy with this as a long term solution…