Catalog / Jekyll Cheatsheet
Jekyll Cheatsheet
A comprehensive cheat sheet covering Jekyll, a static site generator. Includes setup, directory structure, front matter, templating, and more, designed for quick reference.
Getting Started
Installation and Setup
Install Jekyll and Bundler:
|
Create a new Jekyll site:
|
Serve the Jekyll site locally:
|
For GitHub Pages compatibility, use this Gemfile:
|
Update gems:
|
Directory Structure
|
Front Matter & Configuration
Basic Front Matter
Basic syntax:
|
Common front matter variables:
|
Other front matter examples:
|
Configuration (_config.yml)
Basic configuration file example:
|
Key configuration options:
|
More configuration options:
|
Templating with Liquid
Page Variables
Accessing page variables in templates:
|
Common page variables:
|
More examples of page variables:
|
Loops
Looping through posts:
|
Looping through data:
|
Conditionals
Basic conditional logic:
|
Examples:
|
Includes (Partials)
Including partials:
|
Including partials with local variables:
|
Filters & Blogging
Date Formatting
Formatting dates:
|
Common date filters:
|
String Manipulation
String filters:
|
Common string filters:
|
Blogging Basics
Post file naming convention:
|
Image paths in posts:
|
Drafts:
|
Defining excerpts:
|
Excerpt separators:
|