Jekyll is a static platform for blogging. It allows you to write your blog and upload a static site online.
The reason I decided to try out Jekyll is because its posts can be written in Markdown. However the fact that it compiles into plain old HTML is definitely a bonus. This means the pages will be served quickly and there is practically no way to break into it. Jekyll can also be tested locally and is highly customizable.
Jekyll was created in Ruby and requires some command line code to get it running but is definitely worth it. I will installing Jekyll on a Windows 8 machine. (but this is applicable to any Windows)
First you need to install Ruby and the Ruby DevKit from this link
ruby dk.rb init
ruby dk.rb install
Now you need to install Jekyll and RDiscount
gem install jekyll
gem install rdiscount
gem install wdm
Now that we got Jekyll running its time to create a new blog
Go to the folder you wish to store your blog in and create a folder structure as below.
Create 3 folders
_posts: to store the markdown and HTML to store your posts posts
_layouts : to store layouts. This will be the markup that will be like a template for your blog
_includes : lets say you want to make a header and footer and stuff
Create a new file called
_config.yml. This file will be written in the YAML format. Fill the config file with the following
name: "Carl's Blog" url: "http://localhost:4000" paginate: 10 markdown: rdiscount permalink: pretty
http://localhost:4000 will be used to access our blog in the localhost. The markdown will be handled by the rdiscount gem.
Now lets create our first post. Go to the
_posts folder and in a file with the title
YYYY-MM-DD is the post date. The name is the post slug (like a title) and
.md signifies that its written in Markdown
--- title: My first post --- Install and Use Jekyll on Windows Hello World. This is my first post on my **awesome** __Jekyll__ blog
The top part contained in the
--- is called the framing information. Things like categories, tags etc. can be specified as seen here.
cdto the location of the blog
Jekyll build. You should see an _site folder created at the route. This builds your site and converts it to static HTML.
Jekyll serve. This should compile your blog and start the server where you can access it.
Hopefully you have your blog up and running. I'll be doing a follow up post covering the styles and templating to make your blog look good.