jekyll-docs 3.1.6 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll-docs.rb +7 -13
  3. data/site/community/index.html +305 -0
  4. data/site/conduct/index.html +10 -0
  5. data/site/css/screen.css +1445 -0
  6. data/site/docs/assets/index.html +701 -0
  7. data/site/docs/collections/index.html +973 -0
  8. data/site/docs/conduct/index.html +718 -0
  9. data/site/docs/configuration/index.html +1337 -0
  10. data/site/docs/continuous-integration/index.html +846 -0
  11. data/site/docs/contributing/index.html +815 -0
  12. data/site/docs/datafiles/index.html +742 -0
  13. data/site/docs/deployment-methods/index.html +866 -0
  14. data/site/docs/drafts/index.html +615 -0
  15. data/site/docs/extras/index.html +656 -0
  16. data/site/docs/frontmatter/index.html +776 -0
  17. data/site/docs/github-pages/index.html +778 -0
  18. data/site/docs/history/index.html +3293 -0
  19. data/site/docs/home/index.html +627 -0
  20. data/site/docs/index.html +10 -0
  21. data/site/docs/installation/index.html +682 -0
  22. data/site/docs/migrations/index.html +627 -0
  23. data/site/docs/pages/index.html +698 -0
  24. data/site/docs/pagination/index.html +840 -0
  25. data/site/docs/permalinks/index.html +924 -0
  26. data/site/docs/plugins/index.html +1726 -0
  27. data/site/docs/posts/index.html +811 -0
  28. data/site/docs/quickstart/index.html +599 -0
  29. data/site/docs/resources/index.html +717 -0
  30. data/site/docs/sites/index.html +676 -0
  31. data/site/docs/static-files/index.html +655 -0
  32. data/site/docs/structure/index.html +794 -0
  33. data/site/docs/templates/index.html +1105 -0
  34. data/site/docs/themes/index.html +751 -0
  35. data/site/docs/troubleshooting/index.html +826 -0
  36. data/site/docs/upgrading/0-to-2/index.html +802 -0
  37. data/site/docs/upgrading/2-to-3/index.html +785 -0
  38. data/site/docs/upgrading/index.html +664 -0
  39. data/site/docs/usage/index.html +673 -0
  40. data/site/docs/variables/index.html +1013 -0
  41. data/site/docs/windows/index.html +775 -0
  42. data/site/feed.xml +222 -0
  43. data/site/github.html +10 -0
  44. data/site/help/index.html +246 -0
  45. data/site/img/article-footer.png +0 -0
  46. data/site/img/footer-logo.png +0 -0
  47. data/site/img/logo-2x.png +0 -0
  48. data/site/index.html +200 -16
  49. data/site/issues.html +10 -0
  50. data/site/news/2013/05/05/jekyll-1-0-0-released/index.html +524 -0
  51. data/site/news/2013/05/08/jekyll-1-0-1-released/index.html +524 -0
  52. data/site/news/2013/05/12/jekyll-1-0-2-released/index.html +525 -0
  53. data/site/news/2013/06/07/jekyll-1-0-3-released/index.html +522 -0
  54. data/site/news/2013/07/14/jekyll-1-1-0-released/index.html +524 -0
  55. data/site/news/2013/07/24/jekyll-1-1-1-released/index.html +523 -0
  56. data/site/news/2013/07/25/jekyll-1-0-4-released/index.html +519 -0
  57. data/site/news/2013/07/25/jekyll-1-1-2-released/index.html +519 -0
  58. data/site/news/2013/09/06/jekyll-1-2-0-released/index.html +526 -0
  59. data/site/news/2013/09/14/jekyll-1-2-1-released/index.html +520 -0
  60. data/site/news/2013/10/28/jekyll-1-3-0-rc1-released/index.html +518 -0
  61. data/site/news/2013/11/04/jekyll-1-3-0-released/index.html +553 -0
  62. data/site/news/2013/11/26/jekyll-1-3-1-released/index.html +522 -0
  63. data/site/news/2013/12/07/jekyll-1-4-0-released/index.html +537 -0
  64. data/site/news/2013/12/09/jekyll-1-4-1-released/index.html +519 -0
  65. data/site/news/2013/12/16/jekyll-1-4-2-released/index.html +518 -0
  66. data/site/news/2014/01/13/jekyll-1-4-3-released/index.html +527 -0
  67. data/site/news/2014/03/24/jekyll-1-5-0-released/index.html +518 -0
  68. data/site/news/2014/03/27/jekyll-1-5-1-released/index.html +523 -0
  69. data/site/news/2014/05/06/jekyll-turns-2-0-0/index.html +539 -0
  70. data/site/news/2014/05/08/jekyll-2-0-3-released/index.html +519 -0
  71. data/site/news/2014/06/04/jekyll-stickers-1-dollar-stickermule/index.html +521 -0
  72. data/site/news/2014/06/28/jekyll-turns-21-i-mean-2-1-0/index.html +536 -0
  73. data/site/news/2014/07/01/jekyll-2-1-1-released/index.html +533 -0
  74. data/site/news/2014/07/29/jekyll-2-2-0-released/index.html +522 -0
  75. data/site/news/2014/08/10/jekyll-2-3-0-released/index.html +542 -0
  76. data/site/news/2014/09/09/jekyll-2-4-0-released/index.html +528 -0
  77. data/site/news/2014/11/05/jekylls-midlife-crisis-jekyll-turns-2-5-0/index.html +551 -0
  78. data/site/news/2014/11/09/jekyll-2-5-1-released/index.html +529 -0
  79. data/site/news/2014/11/12/jekyll-2-5-2-released/index.html +519 -0
  80. data/site/news/2014/12/17/alfredxing-welcome-to-jekyll-core/index.html +526 -0
  81. data/site/news/2014/12/22/jekyll-2-5-3-released/index.html +521 -0
  82. data/site/news/2015/01/20/jekyll-meet-and-greet/index.html +522 -0
  83. data/site/news/2015/01/24/jekyll-3-0-0-beta1-released/index.html +542 -0
  84. data/site/news/2015/02/26/introducing-jekyll-talk/index.html +517 -0
  85. data/site/news/2015/10/26/jekyll-3-0-released/index.html +546 -0
  86. data/site/news/2015/11/17/jekyll-3-0-1-released/index.html +530 -0
  87. data/site/news/2016/01/20/jekyll-3-0-2-released/index.html +520 -0
  88. data/site/news/2016/01/24/jekyll-3-1-0-released/index.html +553 -0
  89. data/site/news/2016/01/28/jekyll-3-1-1-released/index.html +537 -0
  90. data/site/news/2016/02/08/jekyll-3-0-3-released/index.html +532 -0
  91. data/site/news/2016/02/19/jekyll-3-1-2-released/index.html +523 -0
  92. data/site/news/2016/03/10/making-it-easier-to-contribute-to-jekyll/index.html +519 -0
  93. data/site/news/2016/04/19/jekyll-3-0-4-released/index.html +525 -0
  94. data/site/news/2016/04/19/jekyll-3-1-3-released/index.html +521 -0
  95. data/site/news/2016/04/26/jekyll-3-0-5-released/index.html +526 -0
  96. data/site/news/2016/05/18/jekyll-3-1-4-released/index.html +530 -0
  97. data/site/news/2016/05/18/jekyll-3-1-5-released/index.html +518 -0
  98. data/site/news/2016/05/19/jekyll-3-1-6-released/index.html +520 -0
  99. data/site/news/2016/06/03/update-on-jekyll-s-google-summer-of-code-projects/index.html +521 -0
  100. data/site/news/2016/07/26/jekyll-3-2-0-released/index.html +630 -0
  101. data/site/news/index.html +2831 -10
  102. data/site/news/releases/index.html +2603 -10
  103. data/site/sitemap.xml +327 -0
  104. metadata +99 -111
  105. data/site/_config.yml +0 -25
  106. data/site/_data/docs.yml +0 -49
  107. data/site/_docs/assets.md +0 -94
  108. data/site/_docs/collections.md +0 -380
  109. data/site/_docs/conduct.md +0 -55
  110. data/site/_docs/configuration.md +0 -747
  111. data/site/_docs/continuous-integration.md +0 -221
  112. data/site/_docs/contributing.md +0 -124
  113. data/site/_docs/datafiles.md +0 -151
  114. data/site/_docs/deployment-methods.md +0 -213
  115. data/site/_docs/drafts.md +0 -20
  116. data/site/_docs/extras.md +0 -22
  117. data/site/_docs/frontmatter.md +0 -191
  118. data/site/_docs/github-pages.md +0 -133
  119. data/site/_docs/history.md +0 -2323
  120. data/site/_docs/index.md +0 -57
  121. data/site/_docs/installation.md +0 -106
  122. data/site/_docs/migrations.md +0 -9
  123. data/site/_docs/pages.md +0 -100
  124. data/site/_docs/pagination.md +0 -224
  125. data/site/_docs/permalinks.md +0 -308
  126. data/site/_docs/plugins.md +0 -903
  127. data/site/_docs/posts.md +0 -237
  128. data/site/_docs/quickstart.md +0 -26
  129. data/site/_docs/resources.md +0 -38
  130. data/site/_docs/sites.md +0 -23
  131. data/site/_docs/static_files.md +0 -52
  132. data/site/_docs/structure.md +0 -211
  133. data/site/_docs/templates.md +0 -451
  134. data/site/_docs/troubleshooting.md +0 -207
  135. data/site/_docs/upgrading.md +0 -10
  136. data/site/_docs/upgrading/0-to-2.md +0 -140
  137. data/site/_docs/upgrading/2-to-3.md +0 -126
  138. data/site/_docs/usage.md +0 -101
  139. data/site/_docs/variables.md +0 -390
  140. data/site/_docs/windows.md +0 -46
  141. data/site/_includes/analytics.html +0 -30
  142. data/site/_includes/anchor_links.html +0 -33
  143. data/site/_includes/docs_contents.html +0 -8
  144. data/site/_includes/docs_contents_mobile.html +0 -10
  145. data/site/_includes/docs_option.html +0 -11
  146. data/site/_includes/docs_ul.html +0 -17
  147. data/site/_includes/footer.html +0 -15
  148. data/site/_includes/header.html +0 -18
  149. data/site/_includes/news_contents.html +0 -33
  150. data/site/_includes/news_contents_mobile.html +0 -11
  151. data/site/_includes/news_item.html +0 -24
  152. data/site/_includes/primary-nav-items.html +0 -17
  153. data/site/_includes/section_nav.html +0 -39
  154. data/site/_includes/top.html +0 -17
  155. data/site/_layouts/default.html +0 -13
  156. data/site/_layouts/docs.html +0 -26
  157. data/site/_layouts/news.html +0 -19
  158. data/site/_layouts/news_item.html +0 -27
  159. data/site/_layouts/page.html +0 -18
  160. data/site/_posts/2013-05-06-jekyll-1-0-0-released.markdown +0 -23
  161. data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +0 -27
  162. data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +0 -28
  163. data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +0 -25
  164. data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +0 -27
  165. data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +0 -31
  166. data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +0 -20
  167. data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +0 -20
  168. data/site/_posts/2013-09-06-jekyll-1-2-0-released.markdown +0 -23
  169. data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +0 -19
  170. data/site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown +0 -17
  171. data/site/_posts/2013-11-04-jekyll-1-3-0-released.markdown +0 -43
  172. data/site/_posts/2013-11-26-jekyll-1-3-1-released.markdown +0 -21
  173. data/site/_posts/2013-12-07-jekyll-1-4-0-released.markdown +0 -30
  174. data/site/_posts/2013-12-09-jekyll-1-4-1-released.markdown +0 -18
  175. data/site/_posts/2013-12-16-jekyll-1-4-2-released.markdown +0 -18
  176. data/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown +0 -26
  177. data/site/_posts/2014-03-24-jekyll-1-5-0-released.markdown +0 -19
  178. data/site/_posts/2014-03-27-jekyll-1-5-1-released.markdown +0 -26
  179. data/site/_posts/2014-05-06-jekyll-turns-2-0-0.markdown +0 -31
  180. data/site/_posts/2014-05-08-jekyll-2-0-3-released.markdown +0 -18
  181. data/site/_posts/2014-06-04-jekyll-stickers-1-dollar-stickermule.markdown +0 -19
  182. data/site/_posts/2014-06-28-jekyll-turns-21-i-mean-2-1-0.markdown +0 -31
  183. data/site/_posts/2014-07-01-jekyll-2-1-1-released.markdown +0 -30
  184. data/site/_posts/2014-07-29-jekyll-2-2-0-released.markdown +0 -19
  185. data/site/_posts/2014-08-10-jekyll-2-3-0-released.markdown +0 -41
  186. data/site/_posts/2014-09-09-jekyll-2-4-0-released.markdown +0 -25
  187. data/site/_posts/2014-11-06-jekylls-midlife-crisis-jekyll-turns-2-5-0.markdown +0 -47
  188. data/site/_posts/2014-11-08-jekyll-2-5-1-released.markdown +0 -29
  189. data/site/_posts/2014-11-12-jekyll-2-5-2-released.markdown +0 -18
  190. data/site/_posts/2014-12-17-alfredxing-welcome-to-jekyll-core.md +0 -27
  191. data/site/_posts/2014-12-22-jekyll-2-5-3-released.markdown +0 -20
  192. data/site/_posts/2015-01-20-jekyll-meet-and-greet.markdown +0 -20
  193. data/site/_posts/2015-01-24-jekyll-3-0-0-beta1-released.markdown +0 -40
  194. data/site/_posts/2015-02-26-introducing-jekyll-talk.markdown +0 -15
  195. data/site/_posts/2015-10-26-jekyll-3-0-released.markdown +0 -35
  196. data/site/_posts/2015-11-17-jekyll-3-0-1-released.markdown +0 -25
  197. data/site/_posts/2016-01-20-jekyll-3-0-2-released.markdown +0 -19
  198. data/site/_posts/2016-01-24-jekyll-3-1-0-released.markdown +0 -50
  199. data/site/_posts/2016-01-28-jekyll-3-1-1-released.markdown +0 -33
  200. data/site/_posts/2016-02-08-jekyll-3-0-3-released.markdown +0 -32
  201. data/site/_posts/2016-02-19-jekyll-3-1-2-released.markdown +0 -20
  202. data/site/_sass/_font-awesome.scss +0 -25
  203. data/site/_sass/_gridism.scss +0 -124
  204. data/site/_sass/_mixins.scss +0 -38
  205. data/site/_sass/_normalize.scss +0 -1
  206. data/site/_sass/_pygments.scss +0 -78
  207. data/site/_sass/_style.scss +0 -1002
  208. data/site/css/screen.scss +0 -9
  209. data/site/help/index.md +0 -41
  210. data/site/redirects/github.html +0 -4
  211. data/site/redirects/issues.html +0 -4
@@ -1,57 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Welcome
4
- permalink: /docs/home/
5
- redirect_from: /docs/index.html
6
- ---
7
-
8
- This site aims to be a comprehensive guide to Jekyll. We’ll cover topics such
9
- as getting your site up and running, creating and managing your content,
10
- customizing the way your site works and looks, deploying to various
11
- environments, and give you some advice on participating in the future
12
- development of Jekyll itself.
13
-
14
- ## So what is Jekyll, exactly?
15
-
16
- Jekyll is a simple, blog-aware, static site generator. It takes a template
17
- directory containing raw text files in various formats, runs it through
18
- a converter (like [Markdown](http://daringfireball.net/projects/markdown/))
19
- and our [Liquid](https://github.com/Shopify/liquid/wiki) renderer, and
20
- spits out a complete, ready-to-publish static website suitable
21
- for serving with your favorite web server. Jekyll also happens to be the engine
22
- behind [GitHub Pages](http://pages.github.com), which means you can use Jekyll
23
- to host your project’s page, blog, or website from GitHub’s servers **for
24
- free**.
25
-
26
- ## Helpful Hints
27
-
28
- Throughout this guide there are a number of small-but-handy pieces of
29
- information that can make using Jekyll easier, more interesting, and less
30
- hazardous. Here’s what to look out for.
31
-
32
- <div class="note">
33
- <h5>ProTips™ help you get more from Jekyll</h5>
34
- <p>These are tips and tricks that will help you be a Jekyll wizard!</p>
35
- </div>
36
-
37
- <div class="note info">
38
- <h5>Notes are handy pieces of information</h5>
39
- <p>These are for the extra tidbits sometimes necessary to understand
40
- Jekyll.</p>
41
- </div>
42
-
43
- <div class="note warning">
44
- <h5>Warnings help you not blow things up</h5>
45
- <p>Be aware of these messages if you wish to avoid certain death.</p>
46
- </div>
47
-
48
- <div class="note unreleased">
49
- <h5>You'll see this by a feature that hasn't been released</h5>
50
- <p>Some pieces of this website are for future versions of Jekyll that
51
- are not yet released.</p>
52
- </div>
53
-
54
- If you come across anything along the way that we haven’t covered, or if you
55
- know of a tip you think others would find handy, please [file an
56
- issue]({{ site.repository }}/issues/new) and we’ll see about
57
- including it in this guide.
@@ -1,106 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Installation
4
- permalink: /docs/installation/
5
- ---
6
-
7
- Getting Jekyll installed and ready-to-go should only take a few minutes.
8
- If it ever becomes a pain, please [file an issue]({{ site.repository }}/issues/new)
9
- (or submit a pull request) describing the issue you
10
- encountered and how we might make the process easier
11
-
12
- ### Requirements
13
-
14
- Installing Jekyll is easy and straight-forward, but there are a few
15
- requirements you’ll need to make sure your system has before you start.
16
-
17
- - [Ruby](http://www.ruby-lang.org/en/downloads/) (including development
18
- headers, v1.9.3 or above for Jekyll 2 and v2 or above for Jekyll 3)
19
- - [RubyGems](http://rubygems.org/pages/download)
20
- - Linux, Unix, or Mac OS X
21
- - [NodeJS](http://nodejs.org), or another JavaScript runtime (Jekyll 2 and
22
- earlier, for CoffeeScript support).
23
- - [Python 2.7](https://www.python.org/downloads/) (for Jekyll 2 and earlier)
24
-
25
- <div class="note info">
26
- <h5>Running Jekyll on Windows</h5>
27
- <p>
28
- While Windows is not officially supported, it is possible to get it running
29
- on Windows. Special instructions can be found on our
30
- <a href="../windows/#installation">Windows-specific docs page</a>.
31
- </p>
32
- </div>
33
-
34
- ## Install with RubyGems
35
-
36
- The best way to install Jekyll is via
37
- [RubyGems](http://rubygems.org/pages/download). At the terminal prompt,
38
- simply run the following command to install Jekyll:
39
-
40
- {% highlight bash %}
41
- $ gem install jekyll
42
- {% endhighlight %}
43
-
44
- All of Jekyll’s gem dependencies are automatically installed by the above
45
- command, so you won’t have to worry about them at all. If you have problems
46
- installing Jekyll, check out the [troubleshooting](../troubleshooting/) page or
47
- [report an issue]({{ site.repository }}/issues/new) so the Jekyll
48
- community can improve the experience for everyone.
49
-
50
- <div class="note info">
51
- <h5>Installing Xcode Command-Line Tools</h5>
52
- <p>
53
- If you run into issues installing Jekyll's dependencies which make use of
54
- native extensions and are using Mac OS X, you will need to install Xcode
55
- and the Command-Line Tools it ships with. Download in
56
- <code>Preferences &#8594; Downloads &#8594; Components</code>.
57
- </p>
58
- </div>
59
-
60
- ## Pre-releases
61
-
62
- In order to install a pre-release, make sure you have all the requirements
63
- installed properly and run:
64
-
65
- {% highlight bash %}
66
- gem install jekyll --pre
67
- {% endhighlight %}
68
-
69
- This will install the latest pre-release. If you want a particular pre-release,
70
- use the `-v` switch to indicate the version you'd like to install:
71
-
72
- {% highlight bash %}
73
- gem install jekyll -v '2.0.0.alpha.1'
74
- {% endhighlight %}
75
-
76
- If you'd like to install a development version of Jekyll, the process is a bit
77
- more involved. This gives you the advantage of having the latest and greatest,
78
- but may be unstable.
79
-
80
- {% highlight bash %}
81
- $ git clone git://github.com/jekyll/jekyll.git
82
- $ cd jekyll
83
- $ script/bootstrap
84
- $ bundle exec rake build
85
- $ ls pkg/*.gem | head -n 1 | xargs gem install -l
86
- {% endhighlight %}
87
-
88
- ## Optional Extras
89
-
90
- There are a number of (optional) extra features that Jekyll supports that you
91
- may want to install, depending on how you plan to use Jekyll. These extras
92
- include LaTeX support, and the use of alternative content rendering engines.
93
- Check out [the extras page](../extras/) for more information.
94
-
95
- <div class="note">
96
- <h5>ProTip™: Enable Syntax Highlighting</h5>
97
- <p>
98
- If you’re the kind of person who is using Jekyll, then chances are you’ll
99
- want to enable syntax highlighting using <a href="http://pygments.org/">Pygments</a>
100
- or <a href="https://github.com/jayferd/rouge">Rouge</a>. You should really
101
- <a href="../templates/#code-snippet-highlighting">check out how to
102
- do that</a> before you go any farther.
103
- </p>
104
- </div>
105
-
106
- Now that you’ve got everything installed, let’s get to work!
@@ -1,9 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Blog migrations
4
- permalink: /docs/migrations/
5
- ---
6
-
7
- If you’re switching to Jekyll from another blogging system, Jekyll’s importers
8
- can help you with the move. To learn more about importing your site to Jekyll,
9
- visit our [`jekyll-import` docs site](http://import.jekyllrb.com/docs/home/).
@@ -1,100 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Creating pages
4
- permalink: /docs/pages/
5
- ---
6
-
7
- In addition to [writing posts](../posts/), another thing you may want to do
8
- with your Jekyll site is create static pages. By taking advantage of the way
9
- Jekyll copies files and directories, this is easy to do.
10
-
11
- ## Homepage
12
-
13
- Just about every web server configuration you come across will look for an HTML
14
- file called `index.html` (by convention) in the site's root folder and display
15
- that as the homepage. Unless the web server you’re using is configured to look
16
- for some different filename as the default, this file will turn into the
17
- homepage of your Jekyll-generated site.
18
-
19
- <div class="note">
20
- <h5>ProTip™: Use layouts on your homepage</h5>
21
- <p>
22
- Any HTML file on your site can use layouts and/or includes, even the
23
- homepage. Common content, like headers and footers, make excellent
24
- candidates for extraction into a layout.
25
- </p>
26
- </div>
27
-
28
- ## Where additional pages live
29
-
30
- Where you put HTML or [Markdown](http://daringfireball.net/projects/markdown/)
31
- files for pages depends on how you want the pages to work.
32
- There are two main ways of creating pages:
33
-
34
- - Place named HTML or [Markdown](http://daringfireball.net/projects/markdown/)
35
- files for each page in your site's root folder.
36
- - Create a folder in the site's root for each page, and place an index.html
37
- or index.md file in each page folder.
38
-
39
- Both methods work fine (and can be used in conjunction with each other),
40
- with the only real difference being the resulting URLs.
41
-
42
- ### Named HTML files
43
-
44
- The simplest way of adding a page is just to add an HTML file in the root
45
- directory with a suitable name for the page you want to create. For a site with
46
- a homepage, an about page, and a contact page, here’s what the root directory
47
- and associated URLs might look like:
48
-
49
- {% highlight bash %}
50
- .
51
- |-- _config.yml
52
- |-- _includes/
53
- |-- _layouts/
54
- |-- _posts/
55
- |-- _site/
56
- |-- about.html # => http://example.com/about.html
57
- |-- index.html # => http://example.com/
58
- |-- other.md # => http://example.com/other.html
59
- └── contact.html # => http://example.com/contact.html
60
- {% endhighlight %}
61
-
62
- ### Named folders containing index HTML files
63
-
64
- There is nothing wrong with the above method. However, some people like to keep
65
- their URLs free from things like filename extensions. To achieve clean URLs for
66
- pages using Jekyll, you simply need to create a folder for each top-level page
67
- you want, and then place an `index.html` file in each page’s folder. This way
68
- the page URL ends up being the folder name, and the web server will serve up
69
- the respective `index.html` file. Here's an example of what this structure
70
- might look like:
71
-
72
- {% highlight bash %}
73
- .
74
- ├── _config.yml
75
- ├── _includes/
76
- ├── _layouts/
77
- ├── _posts/
78
- ├── _site/
79
- ├── about/
80
- | └── index.html # => http://example.com/about/
81
- ├── contact/
82
- | └── index.html # => http://example.com/contact/
83
- |── other/
84
- | └── index.md # => http://example.com/other/
85
- └── index.html # => http://example.com/
86
- {% endhighlight %}
87
-
88
- This approach may not suit everyone, but for people who like clean URLs it’s
89
- simple and it works. In the end, the decision is yours!
90
-
91
- <div class="note">
92
- <h5>ProTip™: Use permalink Front Matter Variable</h5>
93
- <p>
94
- Clean URLs can also be achieved using the <code>permalink</code> front
95
- matter variable. In the example above, using the first method, you can
96
- get URL <code>http://example.com/other</code> for the file
97
- <code>other.md</code> by setting this at the top of the file:
98
- <code>permalink: /other</code>
99
- </p>
100
- </div>
@@ -1,224 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Pagination
4
- permalink: /docs/pagination/
5
- ---
6
-
7
- With many websites &mdash; especially blogs &mdash; it’s very common to
8
- break the main listing of posts up into smaller lists and display them over
9
- multiple pages. Jekyll offers a pagination plugin, so you can automatically
10
- generate the appropriate files and folders you need for paginated listings.
11
-
12
- For Jekyll 3, include the `jekyll-paginate` plugin in your Gemfile and in
13
- your `_config.yml` under `gems`. For Jekyll 2, this is standard.
14
-
15
- <div class="note info">
16
- <h5>Pagination only works within HTML files</h5>
17
- <p>
18
- Pagination does not work from within Markdown or Textile files from
19
- your Jekyll site. Pagination works when called from within the HTML
20
- file, named <code>index.html</code>, which optionally may reside in and
21
- produce pagination from within a subdirectory, via the
22
- <code>paginate_path</code> configuration value.
23
- </p>
24
- </div>
25
-
26
- ## Enable pagination
27
-
28
- To enable pagination for your blog, add a line to the `_config.yml` file that
29
- specifies how many items should be displayed per page:
30
-
31
- {% highlight yaml %}
32
- paginate: 5
33
- {% endhighlight %}
34
-
35
- The number should be the maximum number of Posts you’d like to be displayed
36
- per-page in the generated site.
37
-
38
- You may also specify the destination of the pagination pages:
39
-
40
- {% highlight yaml %}
41
- paginate_path: "/blog/page:num/"
42
- {% endhighlight %}
43
-
44
- This will read in `blog/index.html`, send it each pagination page in Liquid as
45
- `paginator` and write the output to `blog/page:num/`, where `:num` is the
46
- pagination page number, starting with `2`. If a site has 12 posts and specifies
47
- `paginate: 5`, Jekyll will write `blog/index.html` with the first 5 posts, `blog/page2/index.html` with the next 5 posts
48
- and `blog/page3/index.html` with the last 2 posts into the destination
49
- directory.
50
-
51
- <div class="note warning">
52
- <h5>Don't set a permalink</h5>
53
- <p>
54
- Setting a permalink in the front matter of your blog page will cause
55
- pagination to break. Just omit the permalink.
56
- </p>
57
- </div>
58
-
59
- ## Liquid Attributes Available
60
-
61
- The pagination plugin exposes the `paginator` liquid object with the following
62
- attributes:
63
-
64
- <div class="mobile-side-scroller">
65
- <table>
66
- <thead>
67
- <tr>
68
- <th>Attribute</th>
69
- <th>Description</th>
70
- </tr>
71
- </thead>
72
- <tbody>
73
- <tr>
74
- <td><p><code>page</code></p></td>
75
- <td><p>current page number</p></td>
76
- </tr>
77
- <tr>
78
- <td><p><code>per_page</code></p></td>
79
- <td><p>number of posts per page</p></td>
80
- </tr>
81
- <tr>
82
- <td><p><code>posts</code></p></td>
83
- <td><p>a list of posts for the current page</p></td>
84
- </tr>
85
- <tr>
86
- <td><p><code>total_posts</code></p></td>
87
- <td><p>total number of posts in the site</p></td>
88
- </tr>
89
- <tr>
90
- <td><p><code>total_pages</code></p></td>
91
- <td><p>number of pagination pages</p></td>
92
- </tr>
93
- <tr>
94
- <td><p><code>previous_page</code></p></td>
95
- <td>
96
- <p>
97
- page number of the previous pagination page,
98
- or <code>nil</code> if no previous page exists
99
- </p>
100
- </td>
101
- </tr>
102
- <tr>
103
- <td><p><code>previous_page_path</code></p></td>
104
- <td>
105
- <p>
106
- path of previous pagination page,
107
- or <code>nil</code> if no previous page exists
108
- </p>
109
- </td>
110
- </tr>
111
- <tr>
112
- <td><p><code>next_page</code></p></td>
113
- <td>
114
- <p>
115
- page number of the next pagination page,
116
- or <code>nil</code> if no subsequent page exists
117
- </p>
118
- </td>
119
- </tr>
120
- <tr>
121
- <td><p><code>next_page_path</code></p></td>
122
- <td>
123
- <p>
124
- path of next pagination page,
125
- or <code>nil</code> if no subsequent page exists
126
- </p>
127
- </td>
128
- </tr>
129
- </tbody>
130
- </table>
131
- </div>
132
-
133
- <div class="note info">
134
- <h5>Pagination does not support tags or categories</h5>
135
- <p>Pagination pages through every post in the <code>posts</code>
136
- variable regardless of variables defined in the YAML Front Matter of
137
- each. It does not currently allow paging over groups of posts linked
138
- by a common tag or category. It cannot include any collection of
139
- documents because it is restricted to posts.</p>
140
- </div>
141
-
142
- ## Render the paginated Posts
143
-
144
- The next thing you need to do is to actually display your posts in a list using
145
- the `paginator` variable that will now be available to you. You’ll probably
146
- want to do this in one of the main pages of your site. Here’s one example of a
147
- simple way of rendering paginated Posts in a HTML file:
148
-
149
- {% highlight html %}
150
- {% raw %}
151
- ---
152
- layout: default
153
- title: My Blog
154
- ---
155
-
156
- <!-- This loops through the paginated posts -->
157
- {% for post in paginator.posts %}
158
- <h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
159
- <p class="author">
160
- <span class="date">{{ post.date }}</span>
161
- </p>
162
- <div class="content">
163
- {{ post.content }}
164
- </div>
165
- {% endfor %}
166
-
167
- <!-- Pagination links -->
168
- <div class="pagination">
169
- {% if paginator.previous_page %}
170
- <a href="{{ paginator.previous_page_path }}" class="previous">Previous</a>
171
- {% else %}
172
- <span class="previous">Previous</span>
173
- {% endif %}
174
- <span class="page_number ">Page: {{ paginator.page }} of {{ paginator.total_pages }}</span>
175
- {% if paginator.next_page %}
176
- <a href="{{ paginator.next_page_path }}" class="next">Next</a>
177
- {% else %}
178
- <span class="next ">Next</span>
179
- {% endif %}
180
- </div>
181
- {% endraw %}
182
- {% endhighlight %}
183
-
184
- <div class="note warning">
185
- <h5>Beware the page one edge-case</h5>
186
- <p>
187
- Jekyll does not generate a ‘page1’ folder, so the above code will not work
188
- when a <code>/page1</code> link is produced. See below for a way to handle
189
- this if it’s a problem for you.
190
- </p>
191
- </div>
192
-
193
- The following HTML snippet should handle page one, and render a list of each
194
- page with links to all but the current page.
195
-
196
- {% highlight html %}
197
- {% raw %}
198
- {% if paginator.total_pages > 1 %}
199
- <div class="pagination">
200
- {% if paginator.previous_page %}
201
- <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; Prev</a>
202
- {% else %}
203
- <span>&laquo; Prev</span>
204
- {% endif %}
205
-
206
- {% for page in (1..paginator.total_pages) %}
207
- {% if page == paginator.page %}
208
- <em>{{ page }}</em>
209
- {% elsif page == 1 %}
210
- <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
211
- {% else %}
212
- <a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
213
- {% endif %}
214
- {% endfor %}
215
-
216
- {% if paginator.next_page %}
217
- <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next &raquo;</a>
218
- {% else %}
219
- <span>Next &raquo;</span>
220
- {% endif %}
221
- </div>
222
- {% endif %}
223
- {% endraw %}
224
- {% endhighlight %}