--- layout: docs title: Configuration prev_section: structure next_section: 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

source: [string]

--source [source]

Site Destination

Changes the directory where Jekyll will write files to

destination: [string]

--destination

Safe

Disables custom plugins.

safe: [boolean]

--safe

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]

### Build Command Options
Setting Options and Flags

Regeneration

Enables auto-regeneration of the site when files are modified. Off by default.

--watch

URL

Sets site.url, useful for environment switching

url: [URL]

--url [URL]

Markdown

Uses RDiscount or [engine] instead of Maruku.

markdown: [engine]

--markdown [rdiscount|kramdown|redcarpet]

Pygments

Enables highlight tag with Pygments.

pygments: [boolean]

--pygments

Future

Publishes posts with a future date

future: [boolean]

--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]

Limit Posts

Limits the number of posts to parse and publish

limit_posts: [max_posts]

--limit_posts [max_posts]

### 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

port: [integer]

--port [port]

Local Server Hostname

Changes the hostname that the Jekyll server will run on

host: [string]

--host [hostname]

Base URL

Serve website from a given base URL

baseurl: [BASE_URL]

--baseurl [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 %}