clarify _config.yml/collections type (#7873)

Merge pull request 7873
This commit is contained in:
Itay Shakury 2019-10-22 16:19:42 +03:00 committed by jekyllbot
parent f8b2748c09
commit 3174d19ee5
1 changed files with 6 additions and 2 deletions

View File

@ -15,8 +15,8 @@ example here's a collection of staff members:
collections: collections:
- staff_members - staff_members
``` ```
In this case `collections` is defined as a sequence (i.e array) with no additional metadata defined for each collection.
You can optionally specify metadata for your collection in the configuration: You can optionally specify metadata for your collection by defining `collections` as a mapping (i.e hashmap) instead of sequence, and then defining additional fields in it:
```yaml ```yaml
collections: collections:
@ -24,6 +24,10 @@ collections:
people: true people: true
``` ```
<div class="note">
<p>When defining a collection as a sequence, it's pages will not be rendered by default. To enable this, <code>output: true</code> must be specified on the collection, which requires defining the collection as a mapping. For more information, see the section <a href="#output">Output</a></p>
</div>
<div class="note"> <div class="note">
<h5>Gather your collections {%- include docs_version_badge.html version="3.7.0" -%}</h5> <h5>Gather your collections {%- include docs_version_badge.html version="3.7.0" -%}</h5>