---
layout: docs
title: Configuration
permalink: /docs/configuration/
---
Jekyll allows you to concoct your sites in any way you can dream up, and it’s
thanks to the powerful and flexible configuration options that this is possible.
These options can either be specified in a `_config.yml` file placed in your
site’s root directory, or can be specified as flags for the `jekyll` executable
in the terminal.
## Configuration Settings
### Global Configuration
The table below lists the available settings for Jekyll, and the various options
(specified in the configuration file) and flags
(specified on the command-line) that control them.
Setting | Options and Flags |
---|---|
Site Source Change the directory where Jekyll will read files |
|
Site Destination Change the directory where Jekyll will write files |
|
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. |
|
Include
Force inclusion of directories and/or files in the conversion.
|
|
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 |
|
Time Zone
Set the time zone for site generation. This sets the |
|
Encoding
Set the encoding of files by name (only available for Ruby
1.9 or later).
The default value is |
|
Defaults Set defaults for YAML Front Matter variables. |
see below |
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.
Setting | Options and Flags |
---|---|
Regeneration Enable auto-regeneration of the site when files are modified. |
|
Configuration Specify config files instead of using |
|
Drafts Process and render draft posts. |
|
Environment Use a specific environment value in the build. |
|
Future Publish posts or collection documents with a future date. |
|
LSI Produce an index for related posts. |
|
Limit Posts Limit the number of posts to parse and publish. |
|
Force polling Force watch to use polling. |
|
Verbose output Print verbose output. |
|
Silence Output Silence the normal output from Jekyll during a build |
|
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. |
|
Liquid profiler Generate a Liquid rendering profile to help you identify performance bottlenecks. |
|
Setting | Options and Flags |
---|---|
Local Server Port Listen on the given port. |
|
Local Server Hostname Listen at the given hostname. |
|
Base URL Serve the website from the given base URL |
|
Detach Detach the server from the terminal |
|
Skips the initial site build. Skips the initial site build which occurs before the server is started. |
|
X.509 (SSL) Private Key SSL Private Key. |
|
X.509 (SSL) Certificate SSL Public certificate. |
|
This will either lead to parsing errors, or Jekyll will revert to the default settings. Use spaces instead.
The _config.yml
master configuration file contains global configurations
and variable definitions that are read once at execution time. Changes made to _config.yml
during automatic regeneration are not loaded until the next execution.
Note Data Files are included and reloaded during automatic regeneration.
Please note that both remove_block_html_tags
and
remove_span_html_tags
are currently unsupported in Jekyll due
to the fact that they are not included within the kramdown HTML converter.
` element, which can be used as a
hint by various JavaScript code highlighting libraries.
- `smart` --- This pseudo-extension turns on SmartyPants, which converts
straight quotes to curly quotes and runs of hyphens to em (`---`) and en (`--`) dashes.
All other extensions retain their usual names from Redcarpet, and no renderer
options aside from `smart` can be specified in Jekyll. [A list of available
extensions can be found in the Redcarpet README file.][redcarpet_extensions]
Make sure you're looking at the README for the right version of
Redcarpet: Jekyll currently uses v3.2.x. The most commonly used
extensions are:
- `tables`
- `no_intra_emphasis`
- `autolink`
[redcarpet_extensions]: https://github.com/vmg/redcarpet/blob/v3.2.2/README.markdown#and-its-like-really-simple-to-use
### Custom Markdown Processors
If you're interested in creating a custom markdown processor, you're in luck! Create a new class in the `Jekyll::Converters::Markdown` namespace:
```ruby
class Jekyll::Converters::Markdown::MyCustomProcessor
def initialize(config)
require 'funky_markdown'
@config = config
rescue LoadError
STDERR.puts 'You are missing a library required for Markdown. Please run:'
STDERR.puts ' $ [sudo] gem install funky_markdown'
raise FatalException.new("Missing dependency: funky_markdown")
end
def convert(content)
::FunkyMarkdown.new(content).convert
end
end
```
Once you've created your class and have it properly set up either as a plugin
in the `_plugins` folder or as a gem, specify it in your `_config.yml`:
```yaml
markdown: MyCustomProcessor
```
## Incremental Regeneration
Incremental regeneration is still an experimental feature
While incremental regeneration will work for the most common cases, it will
not work correctly in every scenario. Please be extremely cautious when
using the feature, and report any problems not listed below by
opening an issue on GitHub.
Incremental regeneration helps shorten build times by only generating documents
and pages that were updated since the previous build. It does this by keeping
track of both file modification times and inter-document dependencies in the
`.jekyll-metadata` file.
Under the current implementation, incremental regeneration will only generate a
document or page if either it, or one of its dependencies, is modified. Currently,
the only types of dependencies tracked are includes (using the
{% raw %}`{% include %}`{% endraw %} tag) and layouts. This means that plain
references to other documents (for example, the common case of iterating over
`site.posts` in a post listings page) will not be detected as a dependency.
To remedy some of these shortfalls, putting `regenerate: true` in the front-matter
of a document will force Jekyll to regenerate it regardless of whether it has been
modified. Note that this will generate the specified document only; references
to other documents' contents will not work since they won't be re-rendered.
Incremental regeneration can be enabled via the `--incremental` flag (`-I` for
short) from the command-line or by setting `incremental: true` in your
configuration file.