LinuxCommandLibrary

jekyll

Generate static websites from templates

TLDR

Generate a development server that will run at

$ jekyll serve
copy

Enable incremental regeneration
$ jekyll serve --incremental
copy

Enable verbose output
$ jekyll serve --verbose
copy

Generate the current directory into ./_site
$ jekyll build
copy

Clean the site (removes site output and cache directory) without building
$ jekyll clean
copy

SYNOPSIS

jekyll command [options]

PARAMETERS

new
    Create a new Jekyll site scaffold

build
    Builds the Jekyll site into ./_site

serve
    Serve site locally with regeneration

clean
    Delete the _site directory

doctor
    Validate site configuration and dependencies

new-post
    Create a new blog post

draft
    Create a new draft post (deprecated)

--help -h
    Show help for command

--version -v
    Print Jekyll version

--config
    Path to config files (default: _config.yml)

--source -s
    Source directory (default: .)

--destination -d
    Destination directory (default: ./_site)

--watch
    Watch for changes and rebuild

--lsi
    Generate Liquid search index

--future
    Publish future-dated posts

--drafts
    Include draft posts

DESCRIPTION

Jekyll is a popular static site generator written in Ruby, designed for creating blogs, documentation sites, and portfolios. It processes plain text files (typically Markdown) marked up with front matter, applies Liquid templates, and outputs a complete static website. No database or server-side code is required, making sites fast, secure, and easy to host anywhere, including GitHub Pages.

Key features include blog-aware functionality (posts, drafts, pagination), customizable layouts, includes, plugins, and asset pipelines for Sass/SCSS and CoffeeScript. Users scaffold sites with jekyll new, build with jekyll build, and preview locally via jekyll serve. It's extensible via gems and supports themes from RubyGems.org.

Ideal for developers preferring simplicity over CMS complexity, Jekyll powers millions of sites. Configuration happens in _config.yml, with content in organized directories like _posts, _layouts. Incremental builds and safe mode enhance development workflow.

CAVEATS

Requires Ruby >= 2.5 and Bundler; install via gem install jekyll bundler. Not a native Linux utility. Large sites may need memory tweaks. Plugins require explicit enabling.

CONFIGURATION

Primary config in _config.yml; supports multiple files via --config. Key settings: title, baseurl, url, theme, plugins, exclude/includ

THEMES

Install via jekyll new-theme or gems like minima. Set theme: minima in config.

FRONT MATTER

YAML block at file top: ---
title: My Post
date: 2023-01-01
---

HISTORY

Created by Tom Preston-Werner in 2008 as a Ruby blog engine. Gained popularity with GitHub Pages integration in 2009. Maintained by Jekyll core team post-Moovweb acquisition. Latest v4.3+ emphasizes performance, security, and compatibility.

SEE ALSO

ruby(1), gem(1), bundler(1)

Copied to clipboard