Intro to Jekyll
Introducing Jekyll
This site is published with Jekyll, a static site generator built in Ruby that auto-publishes raw HTML files, taking care of a lot of repetition and granular markup that you would otherwise have to do by hand if you wanted to create a static HTML site.
How it works
Say I wanted to add a header that shows up everywhere — without a server-side language like PHP I would either have to copy and paste that header on every page of my site, or find a way to pull it in. Copying and pasting is super hard to maintain and just feels yucky. Javascript requires extra front-end code, can take noticeably more time for the user. With a static generator like Jekyll, I can create the footer once and Jekyll will put that footer everywhere once the site is compiled.
jekyll serve
fires up a local server that locally updates your site.
jekyll build
deploys your site, which can be tossed up to Github Pages.
(diagram of authorable file => final site compilation)
How does Jekyll do this? Well, it has this tool called the markdown file, which allows you to just write using shorthand syntax, such as ### for h2
headers.
(diagram of markdown vs html)
#### Why Jekyll?
Having worked on both Drupal and WordPress sites, and on the other end of the web publishing spectrum, static HTML sites, I chose Jekyll as a midway solution this time around because I wanted a tool that gave me the best of both worlds. As with raw HTML pages, it allows me to write and publish without the need for security updates and other types of back-end maintenance. And as with a database-driven site, it creates the HTML pages for me in a way that streamlines the amount of code I need to write in order to produce a site site that allows me to sort and publish content with ease. This happy medium has also made Jekyll a useful tool for other sites you may have seen.
Those are the basics of how it works. For an in-depth look at my personal story with Jekyll, go here.