diff --git a/site/docs/collections.md b/site/docs/collections.md index f4c2239e..3bf9d989 100644 --- a/site/docs/collections.md +++ b/site/docs/collections.md @@ -56,3 +56,104 @@ 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`. + +## Liquid Attributes + +### Collections + +Each collection is part of the `site.collections` array in Liquid. Each collection has the following attributes: + +
+ + + + + + + + + + + + + + + + + +
VariableDescription
+

label

+
+

+ The name of the collection. +

+
+

docs

+
+

+ An array of Documents contained in this collection. +

+
+
+ +### Documents + +In addition to any YAML front-matter provided in the document's corresponding file, each document has the following attributes: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
VariableDescription
+

content

+
+

+ The content of the document. If no YAML front-matter is provided, + this is the entirety of the file contents. If YAML front-matter + is used, then this is all the contents of the file after the terminating + `---` of the front-matter. +

+
+

path

+
+

+ The full path to the document's source file. +

+
+

relative_path

+
+

+ The path to the document's source file relative to the site source. +

+
+

url

+
+

+ The URL of the rendered collection. The file is only written to the + destination when the name of the collection to which it belongs is + included in the render key in the site's configuration file. +

+
+