Directory structure
Jekyll is, at its core, a text transformation engine. The concept behind the system is this: you give it text written in your favorite markup language, be that Markdown, Textile, or just plain HTML, and it churns that through a layout or series of layout files. Throughout that process you can tweak how you want the site URLs to look, what data gets displayed in the layout, and more. This is all done through editing text files, and the static web site is the final product.
A basic Jekyll site usually looks something like this:
An overview of what each of these does:
File / Directory | Description |
---|---|
|
Stores configuration data. Many of these options can be specified from the command line executable but it’s easier to specify them here so you don’t have to remember them. |
|
Drafts are unpublished posts. The format of these files is without a
date: |
|
These are the partials that can be mixed and matched by your layouts
and posts to facilitate reuse. The liquid tag
|
|
These are the templates that wrap posts. Layouts are chosen on a
post-by-post basis in the
YAML Front Matter,
which is described in the next section. The liquid tag
|
|
Your dynamic content, so to speak. The naming convention of these
files is important, and must follow the format:
|
|
Well-formatted site data should be placed here. The jekyll engine
will autoload all YAML files in this directory (using either the
|
|
This is where the generated site will be placed (by default) once
Jekyll is done transforming it. It’s probably a good idea to add this
to your |
|
This helps Jekyll keep track of which files have not been modified
since the site was last built, and which files will need to be
regenerated on the next build. This file will not be included in the
generated site. It’s probably a good idea to add this to your
|
|
Provided that the file has a YAML Front
Matter section, it will be transformed by Jekyll. The same will
happen for any |
Other Files/Folders |
Every other directory and file except for those listed above—such as
|