The static, markdown based, Jekyll powered Beer Tutorials website
Jekyll is a simple, blog-aware, static site generator. It takes a template directory containing raw text files in various formats, runs it through Markdown and Liquid converters, and spits out a complete, ready-to-publish static website suitable for serving with your favorite web server. Jekyll also happens to be the engine behind GitHub Pages.
The full doc on Jekyll is available on Jekyll's doc site.
Using ruby gems:
gem install jekyll
Note: the version of Jekyll on Ubuntu repositories isn't up todate and shouldn't be used
To serve the blog in preview mode, use:
jekyll serve
The preview mode automatically updates after any modification.
To build the static version of the blog, use:
jekyll build
If you want it to rebuild the static site after each modification, add the --watch
flag:
jekyll build --watch
In watch mode, Jekyll will scan the source file and re-generate the blog when files changes.
To write a new post, you add a new file to _posts
.
Filename must respect the naming convention:
YYYY-MM-DD-title-with-dashes.markdown
The markdown files must include a normalized header:
---
layout: post
title: "A nice title"
subtitle: "And the explanation thats follows it"
date: 2014-06-10 12:00:00
author: "Your name here"
header-img: "img/post-bg-01.jpg"
---
The image is a header image, suggested sizes are 1900x600 or 1600x500.
The content of the post is written in markdown.
Images should be placed on a directory inside img
, following this structure:
──img
└──YY
└──MM
├── img01.jpg
└── img02.jpg
As usual, you should fork the blog repository, push to your fork and do a pull request.
Drafts are posts without a date. They’re posts you’re still working on and don’t want to publish yet. To create a new draft, simply put it into the
_drafts
folder, without prefixing its filename with a date:
──_drafts/
└──a-draft-post.md
To preview your drafts, simply run jekyll serve
or jekyll build
with the --drafts
switch. Each draft post will be assigned the value
modification time of the draft file for its date, and thus you will see currently edited drafts as the latest posts.