Serve options
jekyll serve --livereload
Reload the browser on changes
jekyll serve -P <port>
Listen on another port
Default is 4000.
jekyll serve -H <host>
Bind to another host
Use 0.0.0.0 to reach it from other devices.
jekyll serve --open-url
Open the site in a browser
jekyll serve --detach
Run in the background
jekyll serve --skip-initial-build
Serve without building first
jekyll serve --no-watch
Do not rebuild on changes
jekyll serve --show-dir-listing
List folders without an index
jekyll serve --ssl-key <file> --ssl-cert
<file>
Serve over HTTPS
jekyll serve --livereload-port <port>
Set the LiveReload port
Build options
jekyll build --watch
Rebuild when files change
jekyll build -d <dir>
Write output to another folder
The destination is cleaned on every build.
jekyll build -s <dir>
Read the site from another folder
jekyll build --baseurl <path>
Override the base URL path
jekyll build --drafts
Include posts from _drafts
jekyll build --future
Include posts dated in the future
jekyll build --unpublished
Include posts with published: false
jekyll build --incremental
Rebuild only changed files
Experimental; stale pages are possible.
jekyll build --config <a.yml,b.yml>
Use several config files
Later files override earlier ones.
jekyll build --limit_posts <n>
Build only the newest n posts
jekyll build --profile
Show time spent per file
jekyll build --trace
Show full error backtraces
jekyll build --verbose
Print debug output
jekyll build --quiet
Print nothing but errors
jekyll build --force_polling
Poll for changes (VMs, network drives)
jekyll build --strict_front_matter
Fail on invalid front matter
jekyll build --layouts <dir>
Use another layouts folder
JEKYLL_ENV=production jekyll build
Build for production
Many themes only add analytics when this is set.
Config keys
url: https://example.com
Site address, no trailing slash
baseurl: /blog
Subpath the site lives under
Empty by default.
exclude: [<path>, ...]
Skip files, added to the defaults
include: [<path>, ...]
Copy files that would be skipped
keep_files: [<path>, ...]
Keep files when _site is cleaned
permalink: pretty
URL style for posts
Default is date.
markdown: kramdown
Markdown converter
highlighter: rouge
Code highlighter
timezone: <Area/City>
Time zone for dates
destination: <dir>
Output folder (default ./_site)
plugins: [<gem>, ...]
Load plugin gems
collections:
Define custom content groups
defaults:
Front matter set by path or type
theme: <gem>
Use a gem-based theme
show_drafts: true
Same as --drafts