jekyll/site/_posts/2012-07-01-configuration.md

8.4 KiB
Raw Blame History

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 its 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 sites root directory, or can be specified as flags for the jekyll executable in the terminal.

Configuration Settings

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

Safe

Disables custom plugins.

safe: [boolean]

--safe

Regeneration

Enables or disables Jekyll from recreating the site when files are modified.

auto: [boolean]

--auto

--no-auto

Local Server

Fires up a server that will host your _site directory

server: [boolean]

--server

Local Server Port

Changes the port that the Jekyll server will run on

server_port: [integer]

--server [port]

Base URL

Serve website from a given base URL

baseurl: [BASE_URL]

--base-url [url]

URL

Sets site.url, useful for environment switching

url: [URL]

--url [URL]

Site Destination

Changes the directory where Jekyll will write files to

destination: [dir]

jekyll [dest]

Site Source

Changes the directory where Jekyll will look to transform files

source: [dir]

jekyll [source] [dest]

Markdown

Uses RDiscount or [engine] instead of Maruku.

markdown: [engine]

--rdiscount

--kramdown

--redcarpet

Pygments

Enables highlight tag with Pygments.

pygments: [boolean]

--pygments

Future

Publishes posts with a future date

future: [boolean]

--no-future

--future

LSI

Produces an index for related posts.

lsi: [boolean]

--lsi

Permalink

Controls the URLs that posts are generated with. Please refer to the Permalinks page for more info.

permalink: [style]

--permalink=[style]

Pagination

Splits your posts up over multiple subdirectories called "page2", "page3", ... "pageN"

paginate: [per_page]

--paginate [per_page]

Exclude

A list of directories and files to exclude from the conversion

exclude: [dir1, file1, dir2]

Include

A list of directories and files to specifically include in the conversion. .htaccess is a good example since dotfiles are excluded by default.

include: [dir1, file1, dir2]

Limit Posts

Limits the number of posts to parse and publish

limit_posts: [max_posts]

--limit_posts=[max_posts]

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 auto: false server: false server_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 %}