Jekyll is a text transformation engine. The concept behind Jekyll is like this.
- You write text using your preferred markup language (Markdown, Textile, HTML).
- You serve your text up to Jekyll.
- Jekyll churns your text through a single layout (or a series of layouts).
These instructions are ideal for Windows 7 Professional. Adjustments may be necessary if you're using a different Windows OS or OS edition.
Things to download before diving into these instructions.
- Git for Windows
- Ruby 2.0.0 or greater (x86 or x64)
- Development Kit for Ruby (x86 or x64)
The installer for Git is self-explanatory. It walks you through the entire install process. If you run into any issues, check out Git's documentation and videos on their website.
-
Open Git and run these commands. This will create the install directories.
$ mkdir c:\Ruby2.0.0 $ mkdir c:\DevKit -
Install Ruby into the C:\Ruby2.0.0 directory.
-
Install DevKit into the C:\DevKit directory.
-
Open Git and run these commands. The last command will put you back in your $HOME directory.
$ cd c:\devkit $ ruby dk.rb init $ ruby dk.rb install $ cd $HOME
If you get any errors, go to C:\DevKit and open config.yml. Verify that your Ruby directory is listed correctly.
Run the following commands in Git Bash. This will install Jekyll and create your first new website directory.
$ gem install jekyll
$ jekyll new your-website-name
$ cd your-website-name
$ jekyll serve
Verify that your website is "up" by opening a browser and going to http://localhost:4000.
A basic Jekyll site usually looks something like this.
|-- _config.yml
|-- _includes
|-- footer.html
|-- header.html
|-- _layouts
|-- default.html
|-- post.html
|-- _posts
|-- _site
|-- css
|-- style.css
|-- syntax.css
|-- index.html
An overview of what most of these do is included below.
- The
_config.ymlstores configuration data. - The
_includesdirectory holds partials that can be mixed and matched by your layouts to facilitate reuse. - The
_layoutsdirectory contains the templates that wrap posts. - The
_sitedirectory is where the generated site is placed after Jekyll is done transforming it. Add this to your .gitignore file. - Any file with a YAML Front Matter section will be transformed by Jekyll.