LinuxCommandLibrary

jekyll

Generate static websites from templates

TLDR

Generate a development server that will run at http://localhost:4000/

$ 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

build
    Build your site.

serve
    Build your site and serve it locally with a live reload server.

new <path>
    Creates a new Jekyll site at the path specified.

clean
    Clean the site’s destination folder.

help
    Shows available commands.

version
    Show the Jekyll version information.

--config <file1,file2,...>
    Specify one or more configuration files.

--source <directory>
    Set the source directory.

--destination <directory>
    Set the destination directory.

--safe
    Run in safe mode (disable custom plugins and ignore unsafe configuration).

--incremental
    Enable incremental build to speed up build times.

--verbose
    Print verbose output.

--quiet
    Suppress output except for errors.

DESCRIPTION

Jekyll is a static site generator that transforms plain text into static websites and blogs. It takes content written in Markdown (or other text-to-HTML languages) and Liquid templates, and generates a complete, static HTML website ready to be served by a web server like Apache or Nginx.

Jekyll is designed to be simple, blog-aware, and developer-friendly. It doesn't require databases or complex server-side processing. Instead, it focuses on speed, security, and portability, making it an excellent choice for blogs, project documentation, personal websites, and more.

Jekyll is written in Ruby and uses the Liquid templating engine. It's commonly used with GitHub Pages, allowing for easy deployment and hosting of static sites directly from a GitHub repository.

CAVEATS

Jekyll relies on RubyGems for dependency management. Ensure Ruby and RubyGems are properly installed on your system. Certain functionalities might need you to install the appropriate gems such as jekyll-seo-tag before running the commands. Plugins can execute arbitrary code, so be careful when using plugins from untrusted sources.

FRONT MATTER

Front Matter is a YAML block at the top of any Jekyll file (like a Markdown or HTML file) that allows you to specify metadata and configuration options for that specific page or post. It's enclosed by triple-dashed lines (---) and defines variables that can be used within the Liquid templates.

LIQUID TEMPLATING

Jekyll uses the Liquid templating language, which allows you to embed dynamic content within your static files. This includes variables, tags, and filters, enabling you to create dynamic content at build time.

HISTORY

Jekyll was created by Tom Preston-Werner, co-founder of GitHub, in 2008. It was initially developed as a simple blogging engine but has since evolved into a powerful static site generator used for a wide variety of purposes. Its integration with GitHub Pages has been a significant factor in its popularity. Many popular static site generators have been inspired by Jekyll.

SEE ALSO

ruby(1), git(1)

Copied to clipboard