Jekyll is a static site generator that turns simple text files (like Markdown) into a complete website. It’s tightly integrated with GitHub, which means you can use it with GitHub Pages to build blogs, documentation sites, or portfolios without needing a backend server.
Instead of writing raw HTML for every page, you use templates, layouts, and data files—Jekyll assembles everything into a fast, static site.
GitHub Pages supports Jekyll out of the box, so no extra setup is needed for basic use.
Every post requires YAML front matter (e.g., layout: post) to be processed.
The front matter must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines.
---
layout: post
title: Blogging Like a Hacker
---
Just use this: — — It’s the smallest possible “activation switch.”
Using front matter allows you to specify configuration in pages and posts for your site. You can define things like:
Often, you’ll find yourself repeating configuration options (like layouts, categories, or authors). Instead of duplicating this in every file, Jekyll lets you define site-wide defaults.
You can configure defaults in the _config.yml file using the defaults key.
This key holds an array of scope/value pairs that define default settings for files.
defaults:
-
scope:
path: "" # applies to all files
values:
layout: "default"
Even though Jekyll is “static,” it can generate dynamic-looking content using templates and data.
Jekyll post listings are created by iterating over site.posts using Liquid templating.
_posts/ folderYYYY-MM-DD-title.mdAdd this to your index.html:
<ul>
</ul>
_config.ymlcollections:
projects: <!-- notice how you dont need to write the "_" appearing in the folder name -->
output: true
_projects/ # must start with “_”---
title: My Project
---
Project description here.
<ul>
</ul>