8.8 KiB
layout | title | prev_section | next_section |
---|---|---|---|
docs | Configuration | structure | frontmatter |
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
(specifed in the configuration file) and flags
(specified on the command-line) that control them.
Setting | Options and Flags |
---|---|
Site Source Changes the directory where Jekyll will look to transform files |
|
Site Destination Changes the directory where Jekyll will write files to |
|
Safe Disables custom plugins. |
|
Exclude A list of directories and files to exclude from the conversion |
|
Include A list of directories and files to specifically include in the conversion. |
|
Build Command Options
Setting | Options and Flags |
---|---|
Regeneration Enables auto-regeneration of the site when files are modified. Off by default. |
|
URL Sets |
|
Markdown Uses RDiscount or |
|
Pygments Enables highlight tag with Pygments. |
|
Future Publishes posts with a future date |
|
LSI Produces an index for related posts. |
|
Permalink Controls the URLs that posts are generated with. Please refer to the Permalinks page for more info. |
|
Pagination Splits your posts up over multiple subdirectories called "page2", "page3", ... "pageN" |
|
Limit Posts Limits the number of posts to parse and publish |
|
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 Changes the port that the Jekyll server will run on |
|
Local Server Hostname Changes the hostname that the Jekyll server will run on |
|
Base URL Serve website from a given base URL |
|
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.
Default Configuration
Jekyll runs with the following configuration options by default. Unless alternative settings for these options are explicitly specified in the configuration file or on the command-line, Jekyll will run using these options.
{% highlight yaml %} safe: false watch: false server: false host: 0.0.0.0 port: 4000 baseurl: / url: http://localhost:4000
source: . destination: ./_site plugins: ./_plugins
future: true lsi: false pygments: false markdown: maruku permalink: date
maruku: use_tex: false use_divs: false png_engine: blahtex png_dir: images/latex png_url: /images/latex
rdiscount: extensions: []
kramdown: auto_ids: true, footnote_nr: 1 entity_output: as_char toc_levels: 1..6 use_coderay: false
coderay: coderay_wrap: div coderay_line_numbers: inline coderay_line_numbers_start: 1 coderay_tab_width: 4 coderay_bold_every: 10 coderay_css: style
{% endhighlight %}