Configuration Options

The tables below list the available settings for Jekyll, and the various options (specified in the configuration file) and flags (specified on the command-line) that control them.

Global Configuration

Setting Options and Flags

Site Source

Change the directory where Jekyll will read files

source: DIR

-s, --source DIR

Site Destination

Change the directory where Jekyll will write files

destination: DIR

-d, --destination DIR

Safe

Disable custom plugins, and ignore symbolic links.

safe: BOOL

--safe

Exclude

Exclude directories and/or files from the conversion. These exclusions are relative to the site's source directory and cannot be outside the source directory.

exclude: [DIR, FILE, ...]

Include

Force inclusion of directories and/or files in the conversion. .htaccess is a good example since dotfiles are excluded by default.

include: [DIR, FILE, ...]

Keep files

When clobbering the site destination, keep the selected files. Useful for files that are not generated by jekyll; e.g. files or assets that are generated by your build tool. The paths are relative to the destination.

keep_files: [DIR, FILE, ...]

Time Zone

Set the time zone for site generation. This sets the TZ environment variable, which Ruby uses to handle time and date creation and manipulation. Any entry from the IANA Time Zone Database is valid, e.g. America/New_York. A list of all available values can be found here. When serving on a local machine, the default time zone is set by your operating system. But when served on a remote host/server, the default time zone depends on the server's setting or location.

timezone: TIMEZONE

Encoding

Set the encoding of files by name (only available for Ruby 1.9 or later). The default value is utf-8 starting in 2.0.0, and nil before 2.0.0, which will yield the Ruby default of ASCII-8BIT. Available encodings can be shown by the command ruby -e 'puts Encoding::list.join("\n")'.

encoding: ENCODING

Defaults

Set defaults for front matter variables.

see below

Destination folders are cleaned on site builds

The contents of <destination> are automatically cleaned, by default, when the site is built. Files or folders that are not created by your site will be removed. Some files could be retained by specifying them within the <keep_files> configuration directive.

Do not use an important location for <destination>; instead, use it as a staging area and copy files from there to your web server.

Build Command Options

Setting Options and Flags

Regeneration

Enable auto-regeneration of the site when files are modified.

-w, --[no-]watch

Configuration

Specify config files instead of using _config.yml automatically. Settings in later files override settings in earlier files.

--config FILE1[,FILE2,...]

Drafts

Process and render draft posts.

show_drafts: BOOL

--drafts

Environment

Use a specific environment value in the build.

JEKYLL_ENV=production

Future

Publish posts or collection documents with a future date.

future: BOOL

--future

Unpublished

Render posts that were marked as unpublished.

unpublished: BOOL

--unpublished

LSI

Produce an index for related posts. Requires the classifier-reborn plugin.

lsi: BOOL

--lsi

Limit Posts

Limit the number of posts to parse and publish.

limit_posts: NUM

--limit_posts NUM

Force polling

Force watch to use polling.

force_polling: BOOL

--force_polling

Verbose output

Print verbose output.

-V, --verbose

Silence Output

Silence the normal output from Jekyll during a build

-q, --quiet

Incremental build

Enable the experimental incremental build feature. Incremental build only re-builds posts and pages that have changed, resulting in significant performance improvements for large sites, but may also break site generation in certain cases.

incremental: BOOL

-I, --incremental

Liquid profiler

Generate a Liquid rendering profile to help you identify performance bottlenecks.

profile: BOOL

--profile

Strict Front Matter

Cause a build to fail if there is a YAML syntax error in a page's front matter.

strict_front_matter: BOOL

--strict_front_matter

Base URL

Serve the website from the given base URL.

baseurl: URL

--baseurl URL

Serve Command Options

In addition to the options below, the serve sub-command can accept any of the options for the build sub-command, which are then applied to the site build which occurs right before your site is served.

Setting Options and Flags

Local Server Port

Listen on the given port.

port: PORT

--port PORT

Local Server Hostname

Listen at the given hostname.

host: HOSTNAME

--host HOSTNAME

Live Reload

Reload a page automatically on the browser when its content is edited.

livereload: true

-l, --livereload

Detach

Detach the server from the terminal.

detach: BOOL

-B, --detach

Skips the initial site build

Skips the initial site build which occurs before the server is started.

--skip-initial-build

X.509 (SSL) Private Key

SSL Private Key, stored or symlinked in the site source.

--ssl-key

X.509 (SSL) Certificate

SSL Public certificate, stored or symlinked in the site source.

--ssl-cert

Do not use tabs in configuration files

This will either lead to parsing errors, or Jekyll will revert to the default settings. Use spaces instead.