Pekky

A flexible and unfussy static site builder

But Why?

Look, I know there are a bajillion site generators already, but this one is mine and it does what I want. For starters, it’s simple and hackable. The actual codebase is quite small. Barring some mis-organisation on my part it should be readable enough. Secondly, it abandons the idea of magic and instead asks users to be explicit about what they are generating. This allows for reuse of content across a site and other clever tricks.

An Example

The basic structure of the site looks like this:


      content/
          index.yml
      public/
          images/
          stylesheets/
          javascripts/
      views/
          default.html.haml
          layouts/
              default.html.haml
          partials/
              partial.html.haml
      site.rb
      helpers.rb
      

Every site has a site.rb file, which is used to define the pages to be generated along with any general configuration details.


      # ./site.rb
      
      Pekky.site do
        page '/', 'index'
      end
      

Using the configuration above a site can be generated using the pekky command:


      $ pekky --output
      

This will render the site into the output directory of the project. For a more detailed introduction, have a look at the Getting Started page.

Credits