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
@@ -0,0 +1,237 @@
1
+ ---
2
+ layout: docs
3
+ title: Writing posts
4
+ permalink: /docs/posts/
5
+ ---
6
+
7
+ One of Jekyll’s best aspects is that it is “blog aware”. What does this mean,
8
+ exactly? Well, simply put, it means that blogging is baked into Jekyll’s
9
+ functionality. If you write articles and publish them online, this means that
10
+ you can publish and maintain a blog simply by managing a folder of text-files on
11
+ your computer. Compared to the hassle of configuring and maintaining databases
12
+ and web-based CMS systems, this will be a welcome change!
13
+
14
+ ## The Posts Folder
15
+
16
+ As explained on the [directory structure](../structure/) page, the `_posts`
17
+ folder is where your blog posts will live. These files are generally
18
+ [Markdown](http://daringfireball.net/projects/markdown/) or HTML, but can
19
+ be other formats with the proper converter installed.
20
+ All posts must have [YAML Front Matter](../frontmatter/), and they will be
21
+ converted from their source format into an HTML page that is part of your
22
+ static site.
23
+
24
+ ### Creating Post Files
25
+
26
+ To create a new post, all you need to do is create a new file in the `_posts`
27
+ directory. How you name files in this folder is important. Jekyll requires blog
28
+ post files to be named according to the following format:
29
+
30
+ {% highlight bash %}
31
+ YEAR-MONTH-DAY-title.MARKUP
32
+ {% endhighlight %}
33
+
34
+ Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit
35
+ numbers, and `MARKUP` is the file extension representing the format used in the
36
+ file. For example, the following are examples of valid post filenames:
37
+
38
+ {% highlight bash %}
39
+ 2011-12-31-new-years-eve-is-awesome.md
40
+ 2012-09-12-how-to-write-a-blog.textile
41
+ {% endhighlight %}
42
+
43
+ <div class="note">
44
+ <h5>ProTip™: Link to other posts</h5>
45
+ <p>
46
+ Use the <a href="../templates/#post-url"><code>post_url</code></a>
47
+ tag to link to other posts without having to worry about the URL's
48
+ breaking when the site permalink style changes.
49
+ </p>
50
+ </div>
51
+
52
+ ### Content Formats
53
+
54
+ All blog post files must begin with [YAML Front Matter](../frontmatter/). After
55
+ that, it's simply a matter of deciding which format you prefer. Jekyll supports
56
+ [Markdown](http://daringfireball.net/projects/markdown/) out of the box,
57
+ and has [myriad extensions for other formats as well](/docs/plugins/#converters-1),
58
+ including the popular [Textile](http://redcloth.org/textile) format. These
59
+ formats each have their own way of marking up different types of content
60
+ within a post, so you should familiarize yourself with these formats and
61
+ decide which one best suits your needs.
62
+
63
+ <div class="note info">
64
+ <h5>Be aware of character sets</h5>
65
+ <p>
66
+ Content processors can modify certain characters to make them look nicer.
67
+ For example, the <code>smart</code> extension in Redcarpet converts standard,
68
+ ASCII quotation characters to curly, Unicode ones. In order for the browser
69
+ to display those characters properly, define the charset meta value by
70
+ including <code>&lt;meta charset=&quot;utf-8&quot;&gt;</code> in the
71
+ <code>&lt;head&gt;</code> of your layout.
72
+ </p>
73
+ </div>
74
+
75
+ ## Including images and resources
76
+
77
+ Chances are, at some point, you'll want to include images, downloads, or other
78
+ digital assets along with your text content. While the syntax for linking to
79
+ these resources differs between Markdown and Textile, the problem of working
80
+ out where to store these files in your site is something everyone will face.
81
+
82
+ Because of Jekyll’s flexibility, there are many solutions to how to do this.
83
+ One common solution is to create a folder in the root of the project directory
84
+ called something like `assets` or `downloads`, into which any images, downloads
85
+ or other resources are placed. Then, from within any post, they can be linked
86
+ to using the site’s root as the path for the asset to include. Again, this will
87
+ depend on the way your site’s (sub)domain and path are configured, but here
88
+ some examples (in Markdown) of how you could do this using the `site.url`
89
+ variable in a post.
90
+
91
+ Including an image asset in a post:
92
+
93
+ {% highlight text %}
94
+ … which is shown in the screenshot below:
95
+ ![My helpful screenshot]({% raw %}{{ site.url }}{% endraw %}/assets/screenshot.jpg)
96
+ {% endhighlight %}
97
+
98
+ Linking to a PDF for readers to download:
99
+
100
+ {% highlight text %}
101
+ … you can [get the PDF]({% raw %}{{ site.url }}{% endraw %}/assets/mydoc.pdf) directly.
102
+ {% endhighlight %}
103
+
104
+ <div class="note">
105
+ <h5>ProTip™: Link using just the site root URL</h5>
106
+ <p>
107
+ You can skip the <code>{% raw %}{{ site.url }}{% endraw %}</code> variable
108
+ if you <strong>know</strong> your site will only ever be displayed at the
109
+ root URL of your domain. In this case you can reference assets directly with
110
+ just <code>/path/file.jpg</code>.
111
+ </p>
112
+ </div>
113
+
114
+ ## Displaying an index of posts
115
+
116
+ It’s all well and good to have posts in a folder, but a blog is no use unless
117
+ you have a list of posts somewhere. Creating an index of posts on another page
118
+ (or in a [template](../templates/)) is easy, thanks to the [Liquid template
119
+ language](http://wiki.shopify.com/Liquid) and its tags. Here’s a basic example
120
+ of how to create a list of links to your blog posts:
121
+
122
+ {% highlight html %}
123
+ <ul>
124
+ {% raw %}{% for post in site.posts %}{% endraw %}
125
+ <li>
126
+ <a href="{% raw %}{{ post.url }}{% endraw %}">{% raw %}{{ post.title }}{% endraw %}</a>
127
+ </li>
128
+ {% raw %}{% endfor %}{% endraw %}
129
+ </ul>
130
+ {% endhighlight %}
131
+
132
+ Of course, you have full control over how (and where) you display your posts,
133
+ and how you structure your site. You should read more about [how templates
134
+ work](../templates/) with Jekyll if you want to know more.
135
+
136
+ Note that the `post` variable only exists inside the `for` loop above. If
137
+ you wish to access the currently-rendering page/posts's variables (the
138
+ variables of the post/page that has the `for` loop in it), use the `page`
139
+ variable instead.
140
+
141
+ ## Post excerpts
142
+
143
+ Each post automatically takes the first block of text, from the beginning of
144
+ the content to the first occurrence of `excerpt_separator`, and sets it as the `post.excerpt`.
145
+ Take the above example of an index of posts. Perhaps you want to include
146
+ a little hint about the post's content by adding the first paragraph of each of
147
+ your posts:
148
+
149
+ {% highlight html %}
150
+ <ul>
151
+ {% raw %}{% for post in site.posts %}{% endraw %}
152
+ <li>
153
+ <a href="{% raw %}{{ post.url }}{% endraw %}">{% raw %}{{ post.title }}{% endraw %}</a>
154
+ {% raw %}{{ post.excerpt }}{% endraw %}
155
+ </li>
156
+ {% raw %}{% endfor %}{% endraw %}
157
+ </ul>
158
+ {% endhighlight %}
159
+
160
+ Because Jekyll grabs the first paragraph you will not need to wrap the excerpt
161
+ in `p` tags, which is already done for you. These tags can be removed with the
162
+ following if you'd prefer:
163
+
164
+ {% highlight html %}
165
+ {% raw %}{{ post.excerpt | remove: '<p>' | remove: '</p>' }}{% endraw %}
166
+ {% endhighlight %}
167
+
168
+ If you don't like the automatically-generated post excerpt, it can be
169
+ explicitly overridden by adding an `excerpt` value to your post's YAML
170
+ Front Matter. Alternatively, you can choose to define a custom
171
+ `excerpt_separator` in the post's YAML front matter:
172
+
173
+ {% highlight text %}
174
+ ---
175
+ excerpt_separator: <!--more-->
176
+ ---
177
+
178
+ Excerpt
179
+ <!--more-->
180
+ Out-of-excerpt
181
+ {% endhighlight %}
182
+
183
+ You can also set the `excerpt_separator` globally in your `_config.yml`
184
+ configuration file.
185
+
186
+ Completely disable excerpts by setting your `excerpt_separator` to `""`.
187
+
188
+ Also, as with any output generated by Liquid tags, you can pass the
189
+ `| strip_html` filter to remove any html tags in the output. This is
190
+ particularly helpful if you wish to output a post excerpt as a
191
+ `meta="description"` tag within the post `head`, or anywhere else having
192
+ html tags along with the content is not desirable.
193
+
194
+ ## Highlighting code snippets
195
+
196
+ Jekyll also has built-in support for syntax highlighting of code snippets using
197
+ either Pygments or Rouge, and including a code snippet in any post is easy.
198
+ Just use the dedicated Liquid tag as follows:
199
+
200
+ {% highlight text %}
201
+ {% raw %}{% highlight ruby %}{% endraw %}
202
+ def show
203
+ @widget = Widget(params[:id])
204
+ respond_to do |format|
205
+ format.html # show.html.erb
206
+ format.json { render json: @widget }
207
+ end
208
+ end
209
+ {% raw %}{% endhighlight %}{% endraw %}
210
+ {% endhighlight %}
211
+
212
+ And the output will look like this:
213
+
214
+ {% highlight ruby %}
215
+ def show
216
+ @widget = Widget(params[:id])
217
+ respond_to do |format|
218
+ format.html # show.html.erb
219
+ format.json { render json: @widget }
220
+ end
221
+ end
222
+ {% endhighlight %}
223
+
224
+ <div class="note">
225
+ <h5>ProTip™: Show line numbers</h5>
226
+ <p>
227
+ You can make code snippets include line-numbers by adding the word
228
+ <code>linenos</code> to the end of the opening highlight tag like this:
229
+ <code>{% raw %}{% highlight ruby linenos %}{% endraw %}</code>.
230
+ </p>
231
+ </div>
232
+
233
+ These basics should be enough to get you started writing your first posts. When
234
+ you’re ready to dig into what else is possible, you might be interested in
235
+ doing things like [customizing post permalinks](../permalinks/) or
236
+ using [custom variables](../variables/) in your posts and elsewhere on your
237
+ site.
@@ -0,0 +1,27 @@
1
+ ---
2
+ layout: docs
3
+ title: Quick-start guide
4
+ permalink: /docs/quickstart/
5
+ ---
6
+
7
+ For the impatient, here's how to get a boilerplate Jekyll site up and running.
8
+
9
+ {% highlight bash %}
10
+ ~ $ gem install jekyll
11
+ ~ $ jekyll new myblog
12
+ ~ $ cd myblog
13
+ ~/myblog $ jekyll serve
14
+ # => Now browse to http://localhost:4000
15
+ {% endhighlight %}
16
+
17
+ If you wish to install jekyll into the current directory, you can do so by
18
+ alternatively running `jekyll new .` instead of a new directory name.
19
+
20
+ That's nothing, though. The real magic happens when you start creating blog
21
+ posts, using the front matter to control templates and layouts, and taking
22
+ advantage of all the awesome configuration options Jekyll makes available.
23
+
24
+ If you're running into problems, ensure you have all the [requirements
25
+ installed][Installation].
26
+
27
+ [Installation]: /docs/installation/
@@ -0,0 +1,46 @@
1
+ ---
2
+ layout: docs
3
+ title: Resources
4
+ permalink: /docs/resources/
5
+ ---
6
+
7
+ Jekyll’s growing use is producing a wide variety of tutorials, frameworks, extensions, examples, and other resources that can be very helpful. Below is a collection of links to some of the most popular Jekyll resources.
8
+
9
+ ### Jekyll tips & tricks, and examples
10
+
11
+ - [Tips for working with GitHub Pages Integration](https://gist.github.com/2890453)
12
+
13
+ Code example reuse, and keeping documentation up to date.
14
+
15
+ - [Use FormKeep for Jekyll form backend and webhooks](https://formkeep.com/)
16
+ - [Use Simple Form to integrate a simple contact
17
+ form](http://getsimpleform.com/)
18
+ - [JekyllBootstrap.com](http://jekyllbootstrap.com)
19
+
20
+ Provides detailed explanations, examples, and helper-code to make
21
+ getting started with Jekyll easier.
22
+
23
+ ### Tutorials
24
+
25
+ #### Integrating Jekyll with Git
26
+
27
+ - [Blogging with Git, Emacs and Jekyll](http://metajack.im/2009/01/23/blogging-with-git-emacs-and-jekyll/)
28
+
29
+ #### Other hacks
30
+
31
+ - [Integrating Twitter with Jekyll](http://www.justkez.com/integrating-twitter-with-jekyll/)
32
+ > “Having migrated Justkez.com to be based on Jekyll, I was pondering how I might include my recent twitterings on the front page of the site. In the WordPress world, this would have been done via a plugin which may or may not have hung the loading of the page, might have employed caching, but would certainly have had some overheads. … Not in Jekyll.”
33
+ - [‘My Jekyll Fork’, by Mike West](http://mikewest.org/2009/11/my-jekyll-fork)
34
+ > “Jekyll is a well-architected throwback to a time before WordPress, when men were men, and HTML was static. I like the ideas it espouses, and have made a few improvements to it’s core. Here, I’ll point out some highlights of my fork in the hopes that they see usage beyond this site.”
35
+ - [‘About this Website’, by Carter Allen](http://cartera.me/2010/08/12/about-this-website/)
36
+ > “Jekyll is everything that I ever wanted in a blogging engine. Really. It isn’t perfect, but what’s excellent about it is that if there’s something wrong, I know exactly how it works and how to fix it. It runs on the your machine only, and is essentially an added”build" step between you and the browser. I coded this entire site in TextMate using standard HTML5 and CSS3, and then at the end I added just a few little variables to the markup. Presto-chango, my site is built and I am at peace with the world.”
37
+ - [‘Build A Blog With Jekyll And GitHub Pages’, by Barry Clark](http://www.smashingmagazine.com/2014/08/01/build-blog-jekyll-github-pages/)
38
+ > “I recently migrated my blog from WordPress to Jekyll, a fantastic website generator that’s designed for building minimal, static blogs to be hosted on GitHub Pages. The simplicity of Jekyll’s theming layer and writing workflow is fantastic; however, setting up my website took a lot longer than expected. In this article we'll walk through: the quickest way to set up a Jekyll powered blog, how to avoid common problems with using Jekyll, how to import your content from Wordpress, and more.”
39
+ - [Generating a Tag Cloud in Jekyll](http://www.justkez.com/generating-a-tag-cloud-in-jekyll/)
40
+ A guide to implementing a tag cloud and per-tag content pages using Jekyll.
41
+
42
+ - A way to [extend Jekyll](https://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](https://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reused and shared.
43
+
44
+ - [Using your Rails layouts in Jekyll](http://numbers.brighterplanet.com/2010/08/09/sharing-rails-views-with-jekyll)
45
+
46
+ - [Adding Ajax pagination to Jekyll](https://eduardoboucas.com/blog/2014/11/10/adding-ajax-pagination-to-jekyll.html)
@@ -0,0 +1,29 @@
1
+ ---
2
+ layout: docs
3
+ title: Sites using Jekyll
4
+ permalink: /docs/sites/
5
+ ---
6
+
7
+ It’s interesting to see what designs and features others have come up
8
+ with. Below are some Jekyll-powered blogs which were hand-picked for
9
+ learning purposes.
10
+
11
+ - [Tom Preston-Werner](http://tom.preston-werner.com/)
12
+ ([source](https://github.com/mojombo/mojombo.github.io))
13
+ - [Nick Quaranto](http://quaran.to/)
14
+ ([source](https://github.com/qrush/qrush.github.com))
15
+ - [Roger Chapman](http://rogchap.com/)
16
+ ([source](https://github.com/rogchap/rogchap.github.com))
17
+ - [GitHub Official Teaching Materials](http://training.github.com)
18
+ ([source](https://github.com/github/training.github.com/tree/7049d7532a6856411e34046aedfce43a4afaf424))
19
+ - [Rasmus Andersson](http://rsms.me/)
20
+ ([source](https://github.com/rsms/rsms.github.com))
21
+ - [Scott Chacon](http://schacon.github.com)
22
+ ([source](https://github.com/schacon/schacon.github.com))
23
+ - [Leonard Lamprecht](http://leo.im)
24
+ ([source](https://github.com/leo/leo.github.io))
25
+
26
+ If you would like to explore more examples, you can find a list of sites
27
+ and their sources on the ["Sites" page in the Jekyll wiki][jekyll-sites].
28
+
29
+ [jekyll-sites]: {{ site.repository }}/wiki/Sites
@@ -0,0 +1,52 @@
1
+ ---
2
+ layout: docs
3
+ title: Static Files
4
+ permalink: /docs/static-files/
5
+ ---
6
+
7
+ In addition to renderable and convertible content, we also have **static
8
+ files**.
9
+
10
+ A static file is a file that does not contain any YAML front matter. These
11
+ include images, PDFs, and other un-rendered content.
12
+
13
+ They're accessible in Liquid via `site.static_files` and contain the
14
+ following metadata:
15
+
16
+ <div class="mobile-side-scroller">
17
+ <table>
18
+ <thead>
19
+ <tr>
20
+ <th>Variable</th>
21
+ <th>Description</th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <tr>
26
+ <td><p><code>file.path</code></p></td>
27
+ <td><p>
28
+
29
+ The relative path to the file.
30
+
31
+ </p></td>
32
+ </tr>
33
+ <tr>
34
+ <td><p><code>file.modified_time</code></p></td>
35
+ <td><p>
36
+
37
+ The `Time` the file was last modified.
38
+
39
+ </p></td>
40
+ </tr>
41
+ <tr>
42
+ <td><p><code>file.extname</code></p></td>
43
+ <td><p>
44
+
45
+ The extension name for the file, e.g.
46
+ <code>.jpg</code> for <code>image.jpg</code>
47
+
48
+ </p></td>
49
+ </tr>
50
+ </tbody>
51
+ </table>
52
+ </div>
@@ -0,0 +1,211 @@
1
+ ---
2
+ layout: docs
3
+ title: Directory structure
4
+ permalink: /docs/structure/
5
+ ---
6
+
7
+ Jekyll is, at its core, a text transformation engine. The concept behind the
8
+ system is this: you give it text written in your favorite markup language, be
9
+ that Markdown, Textile, or just plain HTML, and it churns that through a layout
10
+ or series of layout files. Throughout that process you can tweak how you want
11
+ the site URLs to look, what data gets displayed in the layout, and more. This
12
+ is all done through editing text files, and the static web site is the final
13
+ product.
14
+
15
+ A basic Jekyll site usually looks something like this:
16
+
17
+ {% highlight bash %}
18
+ .
19
+ ├── _config.yml
20
+ ├── _drafts
21
+ | ├── begin-with-the-crazy-ideas.textile
22
+ | └── on-simplicity-in-technology.markdown
23
+ ├── _includes
24
+ | ├── footer.html
25
+ | └── header.html
26
+ ├── _layouts
27
+ | ├── default.html
28
+ | └── post.html
29
+ ├── _posts
30
+ | ├── 2007-10-29-why-every-programmer-should-play-nethack.textile
31
+ | └── 2009-04-26-barcamp-boston-4-roundup.textile
32
+ ├── _data
33
+ | └── members.yml
34
+ ├── _site
35
+ ├── .jekyll-metadata
36
+ └── index.html
37
+ {% endhighlight %}
38
+
39
+ An overview of what each of these does:
40
+
41
+ <div class="mobile-side-scroller">
42
+ <table>
43
+ <thead>
44
+ <tr>
45
+ <th>File / Directory</th>
46
+ <th>Description</th>
47
+ </tr>
48
+ </thead>
49
+ <tbody>
50
+ <tr>
51
+ <td>
52
+ <p><code>_config.yml</code></p>
53
+ </td>
54
+ <td>
55
+ <p>
56
+
57
+ Stores <a href="../configuration/">configuration</a> data. Many of
58
+ these options can be specified from the command line executable but
59
+ it’s easier to specify them here so you don’t have to remember them.
60
+
61
+ </p>
62
+ </td>
63
+ </tr>
64
+ <tr>
65
+ <td>
66
+ <p><code>_drafts</code></p>
67
+ </td>
68
+ <td>
69
+ <p>
70
+
71
+ Drafts are unpublished posts. The format of these files is without a
72
+ date: <code>title.MARKUP</code>. Learn how to <a href="../drafts/">
73
+ work with drafts</a>.
74
+
75
+ </p>
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <td>
80
+ <p><code>_includes</code></p>
81
+ </td>
82
+ <td>
83
+ <p>
84
+
85
+ These are the partials that can be mixed and matched by your layouts
86
+ and posts to facilitate reuse. The liquid tag
87
+ <code>{% raw %}{% include file.ext %}{% endraw %}</code>
88
+ can be used to include the partial in
89
+ <code>_includes/file.ext</code>.
90
+
91
+ </p>
92
+ </td>
93
+ </tr>
94
+ <tr>
95
+ <td>
96
+ <p><code>_layouts</code></p>
97
+ </td>
98
+ <td>
99
+ <p>
100
+
101
+ These are the templates that wrap posts. Layouts are chosen on a
102
+ post-by-post basis in the
103
+ <a href="../frontmatter/">YAML Front Matter</a>,
104
+ which is described in the next section. The liquid tag
105
+ <code>{% raw %}{{ content }}{% endraw %}</code>
106
+ is used to inject content into the web page.
107
+
108
+ </p>
109
+ </td>
110
+ </tr>
111
+ <tr>
112
+ <td>
113
+ <p><code>_posts</code></p>
114
+ </td>
115
+ <td>
116
+ <p>
117
+
118
+ Your dynamic content, so to speak. The naming convention of these
119
+ files is important, and must follow the format:
120
+ <code>YEAR-MONTH-DAY-title.MARKUP</code>.
121
+ The <a href="../permalinks/">permalinks</a> can be customized for
122
+ each post, but the date and markup language are determined solely by
123
+ the file name.
124
+
125
+ </p>
126
+ </td>
127
+ </tr>
128
+ <tr>
129
+ <td>
130
+ <p><code>_data</code></p>
131
+ </td>
132
+ <td>
133
+ <p>
134
+
135
+ Well-formatted site data should be placed here. The jekyll engine
136
+ will autoload all YAML files in this directory (using either the
137
+ <code>.yml</code>, <code>.yaml</code>, <code>.json</code> or
138
+ <code>.csv</code> formats and extensions) and they will be
139
+ accessible via `site.data`. If there's a file
140
+ <code>members.yml</code> under the directory, then you can access
141
+ contents of the file through <code>site.data.members</code>.
142
+
143
+ </p>
144
+ </td>
145
+ </tr>
146
+ <tr>
147
+ <td>
148
+ <p><code>_site</code></p>
149
+ </td>
150
+ <td>
151
+ <p>
152
+
153
+ This is where the generated site will be placed (by default) once
154
+ Jekyll is done transforming it. It’s probably a good idea to add this
155
+ to your <code>.gitignore</code> file.
156
+
157
+ </p>
158
+ </td>
159
+ </tr>
160
+ <tr>
161
+ <td>
162
+ <p><code>.jekyll-metadata</code></p>
163
+ </td>
164
+ <td>
165
+ <p>
166
+
167
+ This helps Jekyll keep track of which files have not been modified
168
+ since the site was last built, and which files will need to be
169
+ regenerated on the next build. This file will not be included in the
170
+ generated site. It’s probably a good idea to add this to your
171
+ <code>.gitignore</code> file.
172
+
173
+ </p>
174
+ </td>
175
+ </tr>
176
+ <tr>
177
+ <td>
178
+ <p><code>index.html</code> and other HTML, Markdown, Textile files</p>
179
+ </td>
180
+ <td>
181
+ <p>
182
+
183
+ Provided that the file has a <a href="../frontmatter/">YAML Front
184
+ Matter</a> section, it will be transformed by Jekyll. The same will
185
+ happen for any <code>.html</code>, <code>.markdown</code>,
186
+ <code>.md</code>, or <code>.textile</code> file in your site’s root
187
+ directory or directories not listed above.
188
+
189
+ </p>
190
+ </td>
191
+ </tr>
192
+ <tr>
193
+ <td>
194
+ <p>Other Files/Folders</p>
195
+ </td>
196
+ <td>
197
+ <p>
198
+
199
+ Every other directory and file except for those listed above—such as
200
+ <code>css</code> and <code>images</code> folders,
201
+ <code>favicon.ico</code> files, and so forth—will be copied verbatim
202
+ to the generated site. There are plenty of <a href="../sites/">sites
203
+ already using Jekyll</a> if you’re curious to see how they’re laid
204
+ out.
205
+
206
+ </p>
207
+ </td>
208
+ </tr>
209
+ </tbody>
210
+ </table>
211
+ </div>