jekyll-docs 2.5.3 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll-docs.rb +34 -4
  3. data/site/CNAME +1 -0
  4. data/site/README.md +16 -0
  5. data/site/_config.yml +21 -0
  6. data/site/_data/docs.yml +47 -0
  7. data/site/_docs/assets.md +93 -0
  8. data/site/_docs/collections.md +380 -0
  9. data/site/_docs/configuration.md +677 -0
  10. data/site/_docs/continuous-integration.md +221 -0
  11. data/site/_docs/contributing.md +124 -0
  12. data/site/_docs/datafiles.md +151 -0
  13. data/site/_docs/deployment-methods.md +192 -0
  14. data/site/_docs/drafts.md +20 -0
  15. data/site/_docs/extras.md +22 -0
  16. data/site/_docs/frontmatter.md +191 -0
  17. data/site/_docs/github-pages.md +134 -0
  18. data/site/_docs/history.md +2131 -0
  19. data/site/_docs/index.md +56 -0
  20. data/site/_docs/installation.md +106 -0
  21. data/site/_docs/migrations.md +9 -0
  22. data/site/_docs/pages.md +84 -0
  23. data/site/_docs/pagination.md +221 -0
  24. data/site/_docs/permalinks.md +307 -0
  25. data/site/_docs/plugins.md +891 -0
  26. data/site/_docs/posts.md +237 -0
  27. data/site/_docs/quickstart.md +27 -0
  28. data/site/_docs/resources.md +46 -0
  29. data/site/_docs/sites.md +29 -0
  30. data/site/_docs/static_files.md +52 -0
  31. data/site/_docs/structure.md +211 -0
  32. data/site/_docs/templates.md +425 -0
  33. data/site/_docs/troubleshooting.md +207 -0
  34. data/site/_docs/upgrading.md +140 -0
  35. data/site/_docs/usage.md +101 -0
  36. data/site/_docs/variables.md +390 -0
  37. data/site/_docs/windows.md +44 -0
  38. data/site/_includes/analytics.html +30 -0
  39. data/site/_includes/anchor_links.html +33 -0
  40. data/site/_includes/docs_contents.html +8 -0
  41. data/site/_includes/docs_contents_mobile.html +10 -0
  42. data/site/_includes/docs_option.html +11 -0
  43. data/site/_includes/docs_ul.html +21 -0
  44. data/site/_includes/footer.html +15 -0
  45. data/site/_includes/header.html +18 -0
  46. data/site/_includes/news_contents.html +33 -0
  47. data/site/_includes/news_contents_mobile.html +11 -0
  48. data/site/_includes/news_item.html +24 -0
  49. data/site/_includes/primary-nav-items.html +17 -0
  50. data/site/_includes/section_nav.html +39 -0
  51. data/site/_includes/top.html +17 -0
  52. data/site/_layouts/default.html +13 -0
  53. data/site/_layouts/docs.html +26 -0
  54. data/site/_layouts/news.html +19 -0
  55. data/site/_layouts/news_item.html +27 -0
  56. data/site/_layouts/page.html +18 -0
  57. data/site/_posts/2013-05-06-jekyll-1-0-0-released.markdown +23 -0
  58. data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +27 -0
  59. data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +28 -0
  60. data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +25 -0
  61. data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +27 -0
  62. data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +31 -0
  63. data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +20 -0
  64. data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +20 -0
  65. data/site/_posts/2013-09-06-jekyll-1-2-0-released.markdown +23 -0
  66. data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +19 -0
  67. data/site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown +17 -0
  68. data/site/_posts/2013-11-04-jekyll-1-3-0-released.markdown +43 -0
  69. data/site/_posts/2013-11-26-jekyll-1-3-1-released.markdown +21 -0
  70. data/site/_posts/2013-12-07-jekyll-1-4-0-released.markdown +30 -0
  71. data/site/_posts/2013-12-09-jekyll-1-4-1-released.markdown +18 -0
  72. data/site/_posts/2013-12-16-jekyll-1-4-2-released.markdown +18 -0
  73. data/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown +26 -0
  74. data/site/_posts/2014-03-24-jekyll-1-5-0-released.markdown +19 -0
  75. data/site/_posts/2014-03-27-jekyll-1-5-1-released.markdown +26 -0
  76. data/site/_posts/2014-05-06-jekyll-turns-2-0-0.markdown +31 -0
  77. data/site/_posts/2014-05-08-jekyll-2-0-3-released.markdown +18 -0
  78. data/site/_posts/2014-06-04-jekyll-stickers-1-dollar-stickermule.markdown +19 -0
  79. data/site/_posts/2014-06-28-jekyll-turns-21-i-mean-2-1-0.markdown +31 -0
  80. data/site/_posts/2014-07-01-jekyll-2-1-1-released.markdown +30 -0
  81. data/site/_posts/2014-07-29-jekyll-2-2-0-released.markdown +19 -0
  82. data/site/_posts/2014-08-10-jekyll-2-3-0-released.markdown +41 -0
  83. data/site/_posts/2014-09-09-jekyll-2-4-0-released.markdown +25 -0
  84. data/site/_posts/2014-11-06-jekylls-midlife-crisis-jekyll-turns-2-5-0.markdown +47 -0
  85. data/site/_posts/2014-11-08-jekyll-2-5-1-released.markdown +29 -0
  86. data/site/_posts/2014-11-12-jekyll-2-5-2-released.markdown +18 -0
  87. data/site/_posts/2014-12-17-alfredxing-welcome-to-jekyll-core.md +27 -0
  88. data/site/_posts/2014-12-22-jekyll-2-5-3-released.markdown +20 -0
  89. data/site/_posts/2015-01-20-jekyll-meet-and-greet.markdown +20 -0
  90. data/site/_posts/2015-01-24-jekyll-3-0-0-beta1-released.markdown +40 -0
  91. data/site/_posts/2015-02-26-introducing-jekyll-talk.markdown +15 -0
  92. data/site/_posts/2015-10-26-jekyll-3-0-released.markdown +35 -0
  93. data/site/_posts/2015-11-17-jekyll-3-0-1-released.markdown +25 -0
  94. data/site/_posts/2016-01-20-jekyll-3-0-2-released.markdown +14 -0
  95. data/site/_posts/2016-02-08-jekyll-3-0-3-released.markdown +31 -0
  96. data/site/_sass/_font-awesome.scss +25 -0
  97. data/site/_sass/_gridism.scss +124 -0
  98. data/site/_sass/_mixins.scss +38 -0
  99. data/site/_sass/_normalize.scss +1 -0
  100. data/site/_sass/_pygments.scss +78 -0
  101. data/site/_sass/_style.scss +998 -0
  102. data/site/css/screen.scss +9 -0
  103. data/site/favicon.ico +0 -0
  104. data/site/fonts/fontawesome-webfont.eot +0 -0
  105. data/site/fonts/fontawesome-webfont.svg +640 -0
  106. data/site/fonts/fontawesome-webfont.ttf +0 -0
  107. data/site/fonts/fontawesome-webfont.woff +0 -0
  108. data/site/fonts/fontawesome-webfont.woff2 +0 -0
  109. data/site/freenode.txt +1 -0
  110. data/site/help/index.md +36 -0
  111. data/site/img/article-footer.png +0 -0
  112. data/site/img/footer-arrow.png +0 -0
  113. data/site/img/footer-logo.png +0 -0
  114. data/site/img/jekyll-sticker.jpg +0 -0
  115. data/site/img/logo-2x.png +0 -0
  116. data/site/img/logo-rss.png +0 -0
  117. data/site/img/octojekyll.png +0 -0
  118. data/site/index.html +90 -0
  119. data/site/js/html5shiv.min.js +4 -0
  120. data/site/js/respond.min.js +5 -0
  121. data/site/latest_version.txt +1 -0
  122. data/site/news/index.html +10 -0
  123. data/site/news/releases/index.html +10 -0
  124. metadata +138 -6
  125. data/lib/jekyll-docs/version.rb +0 -5
  126. data/lib/jekyll/commands/docs.rb +0 -30
  127. data/lib/jekyll/docs.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c760698c76c16814fa17a1e2bb049a95d898e1ef
4
- data.tar.gz: af335abd2223f8ffd611168cb7f0b5399f994c73
3
+ metadata.gz: 8f516971da8b5173528c10ffc951a3ab53986576
4
+ data.tar.gz: 2577f66a33d3402bdd832c1d8961fe725a22ec18
5
5
  SHA512:
6
- metadata.gz: e9760609b4b898f00f9cd435f557814cc29da4d70b0396cf0974028d059dc1cbd88297f8191352f72a399b467e87717e731ba779bdfe1c497eee8b2a9e19c870
7
- data.tar.gz: 122efe7a48ad9e1956f78ff60204da95cebf56114996831c2845d0479882e7831f404b691acf961abb6c14f4de2b64b6d115fe9406e6a0dde39554affdf5728e
6
+ metadata.gz: 3a4d59816c59bb0ab3f9d6e8af7cd576de38d55aa1af058049d3b8f9cc0cf5f1a30194983a0eb3fbb22af740d13948a9460149d7350e5fc417a59fffd5d52177
7
+ data.tar.gz: b73b89b5ff1589ccc268c5dc3780c60dca889a74e55262173b05630cc1d83bdda7688052acd895305859fcb0ce6ac598c0c6260c49aa4f5da4482124de07f2e5
data/lib/jekyll-docs.rb CHANGED
@@ -1,7 +1,37 @@
1
- require 'jekyll-docs/version'
2
- require 'jekyll/commands/docs'
1
+ require 'rubygems'
2
+ require 'jekyll'
3
+ require 'tmpdir'
3
4
 
4
- module Jekyll
5
- module Docs
5
+ module JekyllDocs
6
+ class DocsCommand < Jekyll::Command
7
+ class << self
8
+ def init_with_program(prog)
9
+ prog.command(:docs) do |cmd|
10
+ cmd.description "Start a local server for the Jekyll documentation"
11
+ cmd.syntax "docs [options]"
12
+ cmd.alias :d
13
+
14
+ cmd.option "port", "-P", "--port", "Port to listen on."
15
+
16
+ cmd.action do |_, opts|
17
+ JekyllDocs::DocsCommand.process(opts)
18
+ end
19
+ end
20
+ end
21
+
22
+ def process(opts)
23
+ Dir.mktmpdir do |dest_dir|
24
+ options = opts.merge({
25
+ "serving" => true,
26
+ "watch" => false,
27
+ "config" => File.expand_path("../../site/_config.yml", __FILE__),
28
+ "source" => File.expand_path("../../site", __FILE__),
29
+ "destination" => dest_dir
30
+ })
31
+ Jekyll::Commands::Build.process(options)
32
+ Jekyll::Commands::Serve.process(options)
33
+ end
34
+ end
35
+ end
6
36
  end
7
37
  end
data/site/CNAME ADDED
@@ -0,0 +1 @@
1
+ jekyllrb.com
data/site/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # Jekyll docs site
2
+
3
+ This directory contains the code for the Jekyll docs site, [jekyllrb.com](http://jekyllrb.com/).
4
+
5
+ ## Contributing
6
+
7
+ For information about contributing, see the [Contributing page](http://jekyllrb.com/docs/contributing/).
8
+
9
+ ## Running locally
10
+
11
+ You can preview your contributions before opening a pull request by running from within the directory:
12
+
13
+ 1. `bundle install`
14
+ 2. `bundle exec rake site:preview`
15
+
16
+ It's just a jekyll site, afterall! :wink:
data/site/_config.yml ADDED
@@ -0,0 +1,21 @@
1
+ markdown: kramdown
2
+ highlighter: pygments
3
+ permalink: /news/:year/:month/:day/:title/
4
+ excerpt_separator: ""
5
+
6
+ gauges_id: 503c5af6613f5d0f19000027
7
+ google_analytics_id: UA-50755011-1
8
+
9
+ repository: https://github.com/jekyll/jekyll
10
+ help_url: https://github.com/jekyll/jekyll-help
11
+
12
+ collections:
13
+ docs:
14
+ output: true
15
+
16
+ name: Jekyll • Simple, blog-aware, static sites
17
+ description: Transform your plain text into static websites and blogs
18
+ url: http://jekyllrb.com
19
+
20
+ gems:
21
+ - jekyll-feed
@@ -0,0 +1,47 @@
1
+ - title: Getting Started
2
+ docs:
3
+ - home
4
+ - quickstart
5
+ - installation
6
+ - usage
7
+ - structure
8
+ - configuration
9
+
10
+ - title: Your Content
11
+ docs:
12
+ - frontmatter
13
+ - posts
14
+ - drafts
15
+ - pages
16
+ - static-files
17
+ - variables
18
+ - collections
19
+ - datafiles
20
+ - assets
21
+ - migrations
22
+
23
+ - title: Customization
24
+ docs:
25
+ - templates
26
+ - permalinks
27
+ - pagination
28
+ - plugins
29
+ - extras
30
+
31
+ - title: Deployment
32
+ docs:
33
+ - github-pages
34
+ - deployment-methods
35
+ - continuous-integration
36
+
37
+ - title: Miscellaneous
38
+ docs:
39
+ - troubleshooting
40
+ - sites
41
+ - resources
42
+ - upgrading
43
+
44
+ - title: Meta
45
+ docs:
46
+ - contributing
47
+ - history
@@ -0,0 +1,93 @@
1
+ ---
2
+ layout: docs
3
+ title: Assets
4
+ permalink: /docs/assets/
5
+ ---
6
+
7
+ Jekyll provides built-in support for Sass and can work with CoffeeScript via
8
+ a Ruby gem. In order to use them, you must first create a file with the
9
+ proper extension name (one of `.sass`, `.scss`, or `.coffee`) and start the
10
+ file with two lines of triple dashes, like this:
11
+
12
+ {% highlight sass %}
13
+ ---
14
+ ---
15
+
16
+ // start content
17
+ .my-definition
18
+ font-size: 1.2em
19
+ {% endhighlight %}
20
+
21
+ Jekyll treats these files the same as a regular page, in that the output file
22
+ will be placed in the same directory that it came from. For instance, if you
23
+ have a file named `css/styles.scss` in your site's source folder, Jekyll
24
+ will process it and put it in your site's destination folder under
25
+ `css/styles.css`.
26
+
27
+ <div class="note info">
28
+ <h5>Jekyll processes all Liquid filters and tags in asset files</h5>
29
+ <p>If you are using <a href="http://mustache.github.io">Mustache</a>
30
+ or another JavaScript templating language that conflicts with
31
+ the <a href="/docs/templates/">Liquid template syntax</a>, you
32
+ will need to place <code>{&#37; raw &#37;}</code> and
33
+ <code>{&#37; endraw &#37;}</code> tags around your code.</p>
34
+ </div>
35
+
36
+ ## Sass/SCSS
37
+
38
+ Jekyll allows you to customize your Sass conversion in certain ways.
39
+
40
+ Place all your partials in your `sass_dir`, which defaults to
41
+ `<source>/_sass`. Place your main SCSS or Sass files in the place you want
42
+ them to be in the output file, such as `<source>/css`. For an example, take
43
+ a look at [this example site using Sass support in Jekyll][example-sass].
44
+
45
+ If you are using Sass `@import` statements, you'll need to ensure that your
46
+ `sass_dir` is set to the base directory that contains your Sass files. You
47
+ can do that thusly:
48
+
49
+ {% highlight yaml %}
50
+ sass:
51
+ sass_dir: _sass
52
+ {% endhighlight %}
53
+
54
+ The Sass converter will default the `sass_dir` configuration option to
55
+ `_sass`.
56
+
57
+ [example-sass]: https://github.com/jekyll/jekyll-sass-converter/tree/master/example
58
+
59
+ <div class="note info">
60
+ <h5>The <code>sass_dir</code> is only used by Sass</h5>
61
+ <p>
62
+
63
+ Note that the <code>sass_dir</code> becomes the load path for Sass imports,
64
+ nothing more. This means that Jekyll does not know about these files
65
+ directly, so any files here should not contain the YAML Front Matter as
66
+ described above nor will they be transformed as described above. This
67
+ folder should only contain imports.
68
+
69
+ </p>
70
+ </div>
71
+
72
+ You may also specify the output style with the `style` option in your
73
+ `_config.yml` file:
74
+
75
+ {% highlight yaml %}
76
+ sass:
77
+ style: compressed
78
+ {% endhighlight %}
79
+
80
+ These are passed to Sass, so any output style options Sass supports are valid
81
+ here, too.
82
+
83
+
84
+ ## Coffeescript
85
+
86
+ To enable Coffeescript in Jekyll 3.0 and up you must
87
+ * Install the `jekyll-coffeescript` gem
88
+ * Ensure that your `_config.yml` is up-to-date and includes the following
89
+
90
+ {% highlight yaml %}
91
+ gems:
92
+ - jekyll-coffeescript
93
+ {% endhighlight %}
@@ -0,0 +1,380 @@
1
+ ---
2
+ layout: docs
3
+ title: Collections
4
+ permalink: /docs/collections/
5
+ ---
6
+
7
+ <div class="note warning">
8
+ <h5>Collections support is unstable and may change</h5>
9
+ <p>
10
+ This is an experimental feature and the API may change until the feature stabilizes.
11
+ </p>
12
+ </div>
13
+
14
+ Not everything is a post or a page. Maybe you want to document the various
15
+ methods in your open source project, members of a team, or talks at a
16
+ conference. Collections allow you to define a new type of document that behave
17
+ like Pages or Posts do normally, but also have their own unique properties and
18
+ namespace.
19
+
20
+ ## Using Collections
21
+
22
+ ### Step 1: Tell Jekyll to read in your collection
23
+
24
+ Add the following to your site's `_config.yml` file, replacing `my_collection`
25
+ with the name of your collection:
26
+
27
+ {% highlight yaml %}
28
+ collections:
29
+ - my_collection
30
+ {% endhighlight %}
31
+
32
+ You can optionally specify metadata for your collection in the configuration:
33
+
34
+ {% highlight yaml %}
35
+ collections:
36
+ my_collection:
37
+ foo: bar
38
+ {% endhighlight %}
39
+
40
+ Default attributes can also be set for a collection:
41
+
42
+ {% highlight yaml %}
43
+ defaults:
44
+ - scope:
45
+ path: ""
46
+ type: my_collection
47
+ values:
48
+ layout: page
49
+ {% endhighlight %}
50
+
51
+ ### Step 2: Add your content
52
+
53
+ Create a corresponding folder (e.g. `<source>/_my_collection`) and add
54
+ documents. YAML Front Matter is read in as data if it exists, and everything
55
+ after it is stuck in the Document's `content` attribute. If no YAML Front
56
+ Matter is provided, Jekyll will not generate the file in your collection.
57
+
58
+ <div class="note info">
59
+ <h5>Be sure to name your directories correctly</h5>
60
+ <p>
61
+ The folder must be named identically to the collection you defined in
62
+ your <code>_config.yml</code> file, with the addition of the preceding <code>_</code> character.
63
+ </p>
64
+ </div>
65
+
66
+ ### Step 3: Optionally render your collection's documents into independent files
67
+
68
+ If you'd like Jekyll to create a public-facing, rendered version of each
69
+ document in your collection, set the `output` key to `true` in your collection
70
+ metadata in your `_config.yml`:
71
+
72
+ {% highlight yaml %}
73
+ collections:
74
+ my_collection:
75
+ output: true
76
+ {% endhighlight %}
77
+
78
+ This will produce a file for each document in the collection.
79
+ For example, if you have `_my_collection/some_subdir/some_doc.md`,
80
+ it will be rendered using Liquid and the Markdown converter of your
81
+ choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`.
82
+
83
+ As for posts with [Permalinks](../permalinks/), the document
84
+ URL can be customized by setting `permalink` metadata for the collection:
85
+
86
+ {% highlight yaml %}
87
+ collections:
88
+ my_collection:
89
+ output: true
90
+ permalink: /awesome/:path/
91
+ {% endhighlight %}
92
+
93
+ For example, if you have `_my_collection/some_subdir/some_doc.md`, it will be
94
+ written out to `<dest>/awesome/some_subdir/some_doc/index.html`.
95
+
96
+ <div class="note info">
97
+ <h5>Don't forget to add YAML for processing</h5>
98
+ <p>
99
+ Files in collections that do not have front matter are treated as
100
+ <a href="/docs/static-files">static files</a> and simply copied to their
101
+ output location without processing.
102
+ </p>
103
+ </div>
104
+
105
+ <div class="mobile-side-scroller">
106
+ <table>
107
+ <thead>
108
+ <tr>
109
+ <th>Variable</th>
110
+ <th>Description</th>
111
+ </tr>
112
+ </thead>
113
+ <tbody>
114
+ <tr>
115
+ <td>
116
+ <p><code>collection</code></p>
117
+ </td>
118
+ <td>
119
+ <p>Label of the containing collection.</p>
120
+ </td>
121
+ </tr>
122
+ <tr>
123
+ <td>
124
+ <p><code>path</code></p>
125
+ </td>
126
+ <td>
127
+ <p>Path to the document relative to the collection's directory.</p>
128
+ </td>
129
+ </tr>
130
+ <tr>
131
+ <td>
132
+ <p><code>name</code></p>
133
+ </td>
134
+ <td>
135
+ <p>The document's base filename, with every sequence of spaces
136
+ and non-alphanumeric characters replaced by a hyphen.</p>
137
+ </td>
138
+ </tr>
139
+ <tr>
140
+ <td>
141
+ <p><code>title</code></p>
142
+ </td>
143
+ <td>
144
+ <p>The document's lowercase title (as defined in its <a href="/docs/frontmatter/">front matter</a>), with every sequence of spaces and non-alphanumeric characters replaced by a hyphen. If the document does not define a title in its <a href="/docs/frontmatter/">front matter</a>, this is equivalent to <code>name</code>.</p>
145
+ </td>
146
+ </tr>
147
+ <tr>
148
+ <td>
149
+ <p><code>output_ext</code></p>
150
+ </td>
151
+ <td>
152
+ <p>Extension of the output file.</p>
153
+ </td>
154
+ </tr>
155
+ </tbody>
156
+ </table>
157
+ </div>
158
+
159
+ ## Liquid Attributes
160
+
161
+ ### Collections
162
+
163
+ Each collection is accessible via the `site` Liquid variable. For example, if
164
+ you want to access the `albums` collection found in `_albums`, you'd use
165
+ `site.albums`. Each collection is itself an array of documents
166
+ (e.g. `site.albums` is an array of documents, much like `site.pages` and
167
+ `site.posts`). See below for how to access attributes of those documents.
168
+
169
+ The collections are also available under `site.collections`, with the metadata
170
+ you specified in your `_config.yml` (if present) and the following information:
171
+
172
+ <div class="mobile-side-scroller">
173
+ <table>
174
+ <thead>
175
+ <tr>
176
+ <th>Variable</th>
177
+ <th>Description</th>
178
+ </tr>
179
+ </thead>
180
+ <tbody>
181
+ <tr>
182
+ <td>
183
+ <p><code>label</code></p>
184
+ </td>
185
+ <td>
186
+ <p>
187
+ The name of your collection, e.g. <code>my_collection</code>.
188
+ </p>
189
+ </td>
190
+ </tr>
191
+ <tr>
192
+ <td>
193
+ <p><code>docs</code></p>
194
+ </td>
195
+ <td>
196
+ <p>
197
+ An array of <a href="#documents">documents</a>.
198
+ </p>
199
+ </td>
200
+ </tr>
201
+ <tr>
202
+ <td>
203
+ <p><code>files</code></p>
204
+ </td>
205
+ <td>
206
+ <p>
207
+ An array of static files in the collection.
208
+ </p>
209
+ </td>
210
+ </tr>
211
+ <tr>
212
+ <td>
213
+ <p><code>relative_directory</code></p>
214
+ </td>
215
+ <td>
216
+ <p>
217
+ The path to the collection's source directory, relative to the site
218
+ source.
219
+ </p>
220
+ </td>
221
+ </tr>
222
+ <tr>
223
+ <td>
224
+ <p><code>directory</code></p>
225
+ </td>
226
+ <td>
227
+ <p>
228
+ The full path to the collections's source directory.
229
+ </p>
230
+ </td>
231
+ </tr>
232
+ <tr>
233
+ <td>
234
+ <p><code>output</code></p>
235
+ </td>
236
+ <td>
237
+ <p>
238
+ Whether the collection's documents will be output as individual
239
+ files.
240
+ </p>
241
+ </td>
242
+ </tr>
243
+ </tbody>
244
+ </table>
245
+ </div>
246
+
247
+
248
+ ### Documents
249
+
250
+ In addition to any YAML Front Matter provided in the document's corresponding
251
+ file, each document has the following attributes:
252
+
253
+ <div class="mobile-side-scroller">
254
+ <table>
255
+ <thead>
256
+ <tr>
257
+ <th>Variable</th>
258
+ <th>Description</th>
259
+ </tr>
260
+ </thead>
261
+ <tbody>
262
+ <tr>
263
+ <td>
264
+ <p><code>content</code></p>
265
+ </td>
266
+ <td>
267
+ <p>
268
+ The (unrendered) content of the document. If no YAML Front Matter is
269
+ provided, Jekyll will not generate the file in your collection. If
270
+ YAML Front Matter is used, then this is all the contents of the file
271
+ after the terminating
272
+ `---` of the front matter.
273
+ </p>
274
+ </td>
275
+ </tr>
276
+ <tr>
277
+ <td>
278
+ <p><code>output</code></p>
279
+ </td>
280
+ <td>
281
+ <p>
282
+ The rendered output of the document, based on the
283
+ <code>content</code>.
284
+ </p>
285
+ </td>
286
+ </tr>
287
+ <tr>
288
+ <td>
289
+ <p><code>path</code></p>
290
+ </td>
291
+ <td>
292
+ <p>
293
+ The full path to the document's source file.
294
+ </p>
295
+ </td>
296
+ </tr>
297
+ <tr>
298
+ <td>
299
+ <p><code>relative_path</code></p>
300
+ </td>
301
+ <td>
302
+ <p>
303
+ The path to the document's source file relative to the site source.
304
+ </p>
305
+ </td>
306
+ </tr>
307
+ <tr>
308
+ <td>
309
+ <p><code>url</code></p>
310
+ </td>
311
+ <td>
312
+ <p>
313
+ The URL of the rendered collection. The file is only written to the
314
+ destination when the name of the collection to which it belongs is
315
+ included in the <code>render</code> key in the site's configuration
316
+ file.
317
+ </p>
318
+ </td>
319
+ </tr>
320
+ <tr>
321
+ <td>
322
+ <p><code>collection</code></p>
323
+ </td>
324
+ <td>
325
+ <p>
326
+ The name of the document's collection.
327
+ </p>
328
+ </td>
329
+ </tr>
330
+ </tbody>
331
+ </table>
332
+ </div>
333
+
334
+ ## Accessing Collection Attributes
335
+
336
+ Attributes from the YAML front matter can be accessed as data anywhere in the
337
+ site. Using the above example for configuring a collection as `site.albums`,
338
+ one might have front matter in an individual file structured as follows (which
339
+ must use a supported markup format, and cannot be saved with a `.yaml`
340
+ extension):
341
+
342
+ {% highlight yaml %}
343
+ title: "Josquin: Missa De beata virgine and Missa Ave maris stella"
344
+ artist: "The Tallis Scholars"
345
+ director: "Peter Phillips"
346
+ works:
347
+ - title: "Missa De beata virgine"
348
+ composer: "Josquin des Prez"
349
+ tracks:
350
+ - title: "Kyrie"
351
+ duration: "4:25"
352
+ - title: "Gloria"
353
+ duration: "9:53"
354
+ - title: "Credo"
355
+ duration: "9:09"
356
+ - title: "Sanctus & Benedictus"
357
+ duration: "7:47"
358
+ - title: "Agnus Dei I, II & III"
359
+ duration: "6:49"
360
+ {% endhighlight %}
361
+
362
+ Every album in the collection could be listed on a single page with a template:
363
+
364
+ {% highlight html %}
365
+ {% raw %}
366
+ {% for album in site.albums %}
367
+ <h2>{{ album.title }}</h2>
368
+ <p>Performed by {{ album.artist }}{% if album.director %}, directed by {{ album.director }}{% endif %}</p>
369
+ {% for work in album.works %}
370
+ <h3>{{ work.title }}</h3>
371
+ <p>Composed by {{ work.composer }}</p>
372
+ <ul>
373
+ {% for track in work.tracks %}
374
+ <li>{{ track.title }} ({{ track.duration }})</li>
375
+ {% endfor %}
376
+ </ul>
377
+ {% endfor %}
378
+ {% endfor %}
379
+ {% endraw %}
380
+ {% endhighlight %}