Allow option to split out _config.yml #514

keithamus opened this Issue Feb 24, 2012 · 2 comments


None yet
3 participants

YAML is a useful way to add data that could potentially repeat a lot in a single website, an example of this is team members, or post authors.

Right now you can only add this data into the _config.yml file. While this works, it can become very unwieldy to have large pieces of data inside this one file.

My suggestion is to have a directive such as additional_configs inside _config.yml which can take an array of YML files which are all read and loaded as variables. Alternatively a _configs directory could exist; Jekyll could then read _config.yml and _configs/*.yml.


parkr commented Dec 26, 2012

Related to #703.

parkr closed this Mar 16, 2013


parkr commented Mar 16, 2013

I'd suggest a plugin that concatenates your files into a _config.yml file for builds.

@voidfiles voidfiles added a commit to voidfiles/jekyll that referenced this issue Apr 1, 2013

@voidfiles voidfiles Added config includes to solve #514 and #703
This is origonaly form this checkin.

I have only tried to cherry pick it on top of the current source
including the corresponding tests and fixtures.

You can now use a YAML list to add configuration files to be included
in the order of the list.

The syntax supports globs (to be used with `Dir[pattern]`), relative
paths to the config value of `source` and absolute paths.

Using this sample config:
  - additional_configs/_config_a.yml
  - additional_configs/_config_b.yml
or the glob version:
  - additional_configs/_config_*.yml
the new deep merge order is in both cases:
`Jekyll::DEFAULTS < _config < _config_a < _config_b`

I've added additional tests for three use cases:
* Having one inclusion
* Having a glob inclusion
* Having one inclusion with override in the main config


@voidfiles voidfiles added a commit to voidfiles/jekyll that referenced this issue Apr 10, 2013

@voidfiles voidfiles Accept multiple config files from command line
Parse config as if it can contain multiple references to config files.
This allows you to pass in multiple config files from the command line

Helps with issues #514 and #703

jekyllbot locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.