People (generated from YAML)

Pets (generated from JSON)

Filter Examples (generated from book in YAML)

Approach 1: Filter Links, Generate all pages

In the page books, the books are organized in two lists: books I have read and those I have not. However a page is still generated for each book. This is not a filter on the pages being generated: it is only a filter on the links being generated.

Approach 2: filter keyword

If the yaml matter has a boolean field (for instance: filter or, more evocatively, publish), I can specify it in _config to select what pages have to be generated.

Approach 3: filter_condition keyword

I can use the filter_condition field in config.yml. The field takes as argument a string with ruby expression which should evaluate to a Boolean value. The filter_condition is used as an additional selector on top of the filter condition.

See the documentation for more details.

Hierarchy Example

If your data is structured in a hierarhcy, specify the path to access your data in the data field.

See the file _data/hierarchy.yml for a working example. The pages generated are the following:

books hierarchy members pets