diff --git a/site/_data/docs.yml b/site/_data/docs.yml index 1c790636..7d0a83f3 100644 --- a/site/_data/docs.yml +++ b/site/_data/docs.yml @@ -14,6 +14,7 @@ - drafts - pages - variables + - collections - datafiles - assets - migrations diff --git a/site/docs/collections.md b/site/docs/collections.md new file mode 100644 index 00000000..0016cf4c --- /dev/null +++ b/site/docs/collections.md @@ -0,0 +1,48 @@ +--- +layout: docs +title: Collections +prev_section: variables +next_section: datafiles +permalink: /docs/collections/ +--- + +
+
Collections support is currently unreleased.
+

+ In order to use this feature, + install the latest development version of Jekyll. +

+
+ +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. `/_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 `/my_collection/some_subdir/some_doc.html`. diff --git a/site/docs/datafiles.md b/site/docs/datafiles.md index 55af6ec4..1dbe4097 100644 --- a/site/docs/datafiles.md +++ b/site/docs/datafiles.md @@ -1,7 +1,7 @@ --- layout: docs title: Data Files -prev_section: variables +prev_section: collections next_section: assets permalink: /docs/datafiles/ --- diff --git a/site/docs/variables.md b/site/docs/variables.md index 2c6d3849..d6c7390b 100644 --- a/site/docs/variables.md +++ b/site/docs/variables.md @@ -2,7 +2,7 @@ layout: docs title: Variables prev_section: pages -next_section: datafiles +next_section: collections permalink: /docs/variables/ ---