{"id":250931,"date":"2017-02-06T05:59:38","date_gmt":"2017-02-06T12:59:38","guid":{"rendered":"http:\/\/css-tricks.com\/?p=250931"},"modified":"2017-02-06T05:59:38","modified_gmt":"2017-02-06T12:59:38","slug":"really-makes-static-site-generator","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/really-makes-static-site-generator\/","title":{"rendered":"What Really Makes a Static Site Generator?"},"content":{"rendered":"

I talk a lot about static site generators, but always about using<\/em> static site generators. In most cases, it may seem like a black box. I create a template and some Markdown and out comes a fully formed HTML page. Magic!<\/p>\n

But what exactly is<\/em> a static site generator? What goes on inside that black box? What kind of voodoo is this?<\/p>\n

In this post, I want to explore all of the parts that make up a static site generator. First, we’ll discuss these in a general fashion, but then we’ll take a closer look at some actual code by delving deep inside HarpJS<\/a>. So, put your adventurer’s cap on and let’s start exploring.<\/p>\n

<\/p>\n

Why Harp?<\/strong> For two reasons. The first is that HarpJS is, by design, a very simple static site generator. It doesn’t have a lot of the features that might cause us to get lost exploring a more comprehensively full-featured static site generator (like Jekyll<\/a> for instance). The second, much more practical, reason is that I know JavaScript and don’t know Ruby very well.<\/p>\n

The Basics of a Static Site Generator<\/h3>\n

The truth is, a static site generator is a pretty simple concept. The key ingredients to a static site generator are typically:<\/p>\n