Add some documentation
This commit is contained in:
parent
37a7236e20
commit
77bb678a3d
|
@ -14,6 +14,7 @@
|
|||
- drafts
|
||||
- pages
|
||||
- variables
|
||||
- collections
|
||||
- datafiles
|
||||
- assets
|
||||
- migrations
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Collections
|
||||
prev_section: variables
|
||||
next_section: datafiles
|
||||
permalink: /docs/collections/
|
||||
---
|
||||
|
||||
<div class="note unreleased">
|
||||
<h5>Collections support is currently unreleased.</h5>
|
||||
<p>
|
||||
In order to use this feature, <a href="/docs/installation/#pre-releases">
|
||||
install the latest development version of Jekyll</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Put some things in a folder and add the folder to your config. It's simple...
|
||||
|
||||
Why did we write this feature? What is it useful for?
|
||||
|
||||
## Using Collections
|
||||
|
||||
### Step 1: Tell Jekyll to read in your collection
|
||||
|
||||
{% highlight yaml %}
|
||||
collections:
|
||||
- my_collection
|
||||
{% endhighlight %}
|
||||
|
||||
### Step 2: Add your content
|
||||
|
||||
Create a corresponding folder (e.g. `<source>/_my_collection`) and add documents.
|
||||
YAML front-matter is read in as data if it exists, if not, then everything is just
|
||||
stuck in the Document's `content` attribute.
|
||||
|
||||
### Step 3: Optionally render your collection's documents into independent files
|
||||
|
||||
If you'd like your files rendered, add it to your config:
|
||||
|
||||
{% highlight yaml %}
|
||||
render:
|
||||
- my_collection
|
||||
{% endhighlight %}
|
||||
|
||||
This will produce a file for each document in the collection.
|
||||
For example, if you have `_my_collection/some_subdir/some_doc.md`,
|
||||
it will be rendered using Liquid and the Markdown converter of your
|
||||
choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`.
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Data Files
|
||||
prev_section: variables
|
||||
prev_section: collections
|
||||
next_section: assets
|
||||
permalink: /docs/datafiles/
|
||||
---
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
layout: docs
|
||||
title: Variables
|
||||
prev_section: pages
|
||||
next_section: datafiles
|
||||
next_section: collections
|
||||
permalink: /docs/variables/
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in New Issue