jekyll 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jekyll might be problematic. Click here for more details.

Files changed (306) hide show
  1. checksums.yaml +4 -4
  2. data/README.markdown +1 -1
  3. data/lib/jekyll.rb +0 -1
  4. data/lib/jekyll/collection.rb +18 -3
  5. data/lib/jekyll/command.rb +0 -25
  6. data/lib/jekyll/commands/build.rb +7 -2
  7. data/lib/jekyll/commands/help.rb +33 -0
  8. data/lib/jekyll/configuration.rb +36 -28
  9. data/lib/jekyll/converters/markdown/kramdown_parser.rb +1 -1
  10. data/lib/jekyll/convertible.rb +43 -20
  11. data/lib/jekyll/deprecator.rb +15 -8
  12. data/lib/jekyll/document.rb +21 -4
  13. data/lib/jekyll/filters.rb +27 -1
  14. data/lib/jekyll/frontmatter_defaults.rb +46 -12
  15. data/lib/jekyll/plugin.rb +10 -1
  16. data/lib/jekyll/post.rb +6 -13
  17. data/lib/jekyll/related_posts.rb +2 -2
  18. data/lib/jekyll/renderer.rb +7 -2
  19. data/lib/jekyll/site.rb +5 -7
  20. data/lib/jekyll/static_file.rb +24 -4
  21. data/lib/jekyll/tags/include.rb +3 -1
  22. data/lib/jekyll/tags/post_url.rb +2 -2
  23. data/lib/jekyll/utils.rb +88 -69
  24. data/lib/jekyll/version.rb +1 -1
  25. data/lib/site_template/_config.yml +6 -4
  26. data/lib/site_template/_includes/footer.html +43 -49
  27. data/lib/site_template/_includes/head.html +3 -4
  28. data/lib/site_template/_includes/header.html +9 -10
  29. data/lib/site_template/_layouts/default.html +6 -5
  30. data/lib/site_template/_layouts/page.html +3 -3
  31. data/lib/site_template/_layouts/post.html +4 -4
  32. data/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb +6 -5
  33. data/lib/site_template/_sass/_base.scss +203 -0
  34. data/lib/site_template/_sass/_layout.scss +236 -0
  35. data/lib/site_template/_sass/_syntax-highlighting.scss +67 -0
  36. data/lib/site_template/css/main.scss +49 -0
  37. data/lib/site_template/feed.xml +1 -1
  38. data/lib/site_template/index.html +7 -4
  39. metadata +24 -431
  40. data/.gitignore +0 -15
  41. data/.travis.yml +0 -27
  42. data/CONTRIBUTING.markdown +0 -91
  43. data/Gemfile +0 -2
  44. data/History.markdown +0 -1310
  45. data/Rakefile +0 -268
  46. data/cucumber.yml +0 -3
  47. data/docs/jp/CONTRIBUTING.jp.markdown +0 -93
  48. data/docs/jp/README.jp.markdown +0 -68
  49. data/features/collections.feature +0 -145
  50. data/features/create_sites.feature +0 -158
  51. data/features/data.feature +0 -105
  52. data/features/drafts.feature +0 -46
  53. data/features/embed_filters.feature +0 -107
  54. data/features/frontmatter_defaults.feature +0 -136
  55. data/features/include_tag.feature +0 -68
  56. data/features/markdown.feature +0 -67
  57. data/features/pagination.feature +0 -82
  58. data/features/permalinks.feature +0 -85
  59. data/features/post_data.feature +0 -261
  60. data/features/post_excerpts.feature +0 -50
  61. data/features/rendering.feature +0 -34
  62. data/features/site_configuration.feature +0 -283
  63. data/features/site_data.feature +0 -107
  64. data/features/step_definitions/jekyll_steps.rb +0 -201
  65. data/features/support/env.rb +0 -65
  66. data/jekyll.gemspec +0 -66
  67. data/lib/site_template/css/main.css +0 -410
  68. data/script/bootstrap +0 -4
  69. data/script/branding +0 -11
  70. data/script/cibuild +0 -7
  71. data/script/console +0 -38
  72. data/script/proof +0 -22
  73. data/script/rebund +0 -140
  74. data/script/test +0 -17
  75. data/site/.gitignore +0 -4
  76. data/site/CNAME +0 -1
  77. data/site/README +0 -1
  78. data/site/_config.yml +0 -9
  79. data/site/_data/docs.yml +0 -46
  80. data/site/_includes/analytics.html +0 -30
  81. data/site/_includes/anchor_links.html +0 -32
  82. data/site/_includes/css/font-awesome.css +0 -44
  83. data/site/_includes/css/gridism.css +0 -110
  84. data/site/_includes/css/normalize.css +0 -1
  85. data/site/_includes/css/pygments.css +0 -72
  86. data/site/_includes/css/style.css +0 -1045
  87. data/site/_includes/docs_contents.html +0 -8
  88. data/site/_includes/docs_contents_mobile.html +0 -10
  89. data/site/_includes/docs_option.html +0 -11
  90. data/site/_includes/docs_ul.html +0 -20
  91. data/site/_includes/footer.html +0 -15
  92. data/site/_includes/header.html +0 -18
  93. data/site/_includes/news_contents.html +0 -33
  94. data/site/_includes/news_contents_mobile.html +0 -11
  95. data/site/_includes/news_item.html +0 -24
  96. data/site/_includes/primary-nav-items.html +0 -17
  97. data/site/_includes/section_nav.html +0 -22
  98. data/site/_includes/top.html +0 -17
  99. data/site/_layouts/default.html +0 -13
  100. data/site/_layouts/docs.html +0 -23
  101. data/site/_layouts/news.html +0 -19
  102. data/site/_layouts/news_item.html +0 -27
  103. data/site/_posts/2013-05-06-jekyll-1-0-0-released.markdown +0 -23
  104. data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +0 -27
  105. data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +0 -28
  106. data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +0 -25
  107. data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +0 -27
  108. data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +0 -31
  109. data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +0 -20
  110. data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +0 -20
  111. data/site/_posts/2013-09-06-jekyll-1-2-0-released.markdown +0 -23
  112. data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +0 -19
  113. data/site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown +0 -19
  114. data/site/_posts/2013-11-04-jekyll-1-3-0-released.markdown +0 -43
  115. data/site/_posts/2013-11-26-jekyll-1-3-1-released.markdown +0 -21
  116. data/site/_posts/2013-12-07-jekyll-1-4-0-released.markdown +0 -30
  117. data/site/_posts/2013-12-09-jekyll-1-4-1-released.markdown +0 -20
  118. data/site/_posts/2013-12-16-jekyll-1-4-2-released.markdown +0 -18
  119. data/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown +0 -26
  120. data/site/_posts/2014-03-24-jekyll-1-5-0-released.markdown +0 -19
  121. data/site/_posts/2014-03-27-jekyll-1-5-1-released.markdown +0 -26
  122. data/site/_posts/2014-05-06-jekyll-turns-2-0-0.markdown +0 -31
  123. data/site/_posts/2014-05-08-jekyll-2-0-3-released.markdown +0 -18
  124. data/site/_posts/2014-06-04-jekyll-stickers-1-dollar-stickermule.markdown +0 -19
  125. data/site/_posts/2014-06-28-jekyll-turns-21-i-mean-2-1-0.markdown +0 -31
  126. data/site/_posts/2014-07-01-jekyll-2-1-1-released.markdown +0 -30
  127. data/site/_posts/2014-07-29-jekyll-2-2-0-released.markdown +0 -19
  128. data/site/css/screen.css +0 -31
  129. data/site/docs/assets.md +0 -66
  130. data/site/docs/collections.md +0 -259
  131. data/site/docs/configuration.md +0 -536
  132. data/site/docs/continuous-integration.md +0 -177
  133. data/site/docs/contributing.md +0 -133
  134. data/site/docs/datafiles.md +0 -108
  135. data/site/docs/deployment-methods.md +0 -127
  136. data/site/docs/drafts.md +0 -21
  137. data/site/docs/extras.md +0 -18
  138. data/site/docs/frontmatter.md +0 -191
  139. data/site/docs/github-pages.md +0 -91
  140. data/site/docs/history.md +0 -1514
  141. data/site/docs/index.md +0 -58
  142. data/site/docs/installation.md +0 -106
  143. data/site/docs/migrations.md +0 -11
  144. data/site/docs/pages.md +0 -86
  145. data/site/docs/pagination.md +0 -212
  146. data/site/docs/permalinks.md +0 -188
  147. data/site/docs/plugins.md +0 -561
  148. data/site/docs/posts.md +0 -211
  149. data/site/docs/quickstart.md +0 -26
  150. data/site/docs/resources.md +0 -43
  151. data/site/docs/sites.md +0 -29
  152. data/site/docs/structure.md +0 -190
  153. data/site/docs/templates.md +0 -376
  154. data/site/docs/troubleshooting.md +0 -147
  155. data/site/docs/upgrading.md +0 -146
  156. data/site/docs/usage.md +0 -74
  157. data/site/docs/variables.md +0 -382
  158. data/site/docs/windows.md +0 -44
  159. data/site/favicon.ico +0 -0
  160. data/site/feed.xml +0 -48
  161. data/site/fonts/FontAwesome.otf +0 -0
  162. data/site/fonts/fontawesome-webfont.eot +0 -0
  163. data/site/fonts/fontawesome-webfont.svg +0 -504
  164. data/site/fonts/fontawesome-webfont.ttf +0 -0
  165. data/site/fonts/fontawesome-webfont.woff +0 -0
  166. data/site/freenode.txt +0 -1
  167. data/site/img/article-footer.png +0 -0
  168. data/site/img/footer-arrow.png +0 -0
  169. data/site/img/footer-logo.png +0 -0
  170. data/site/img/jekyll-sticker.jpg +0 -0
  171. data/site/img/logo-2x.png +0 -0
  172. data/site/img/logo-rss.png +0 -0
  173. data/site/img/octojekyll.png +0 -0
  174. data/site/index.html +0 -90
  175. data/site/js/html5shiv.min.js +0 -4
  176. data/site/js/respond.min.js +0 -5
  177. data/site/news/index.html +0 -10
  178. data/site/news/releases/index.html +0 -10
  179. data/test/fixtures/broken_front_matter1.erb +0 -5
  180. data/test/fixtures/broken_front_matter2.erb +0 -4
  181. data/test/fixtures/broken_front_matter3.erb +0 -7
  182. data/test/fixtures/exploit_front_matter.erb +0 -4
  183. data/test/fixtures/front_matter.erb +0 -4
  184. data/test/helper.rb +0 -80
  185. data/test/source/+/%# +.md +0 -6
  186. data/test/source/+/foo.md +0 -7
  187. data/test/source/.htaccess +0 -8
  188. data/test/source/_config.dev.toml +0 -2
  189. data/test/source/_data/categories/dairy.yaml +0 -6
  190. data/test/source/_data/languages.yml +0 -2
  191. data/test/source/_data/members.json +0 -12
  192. data/test/source/_data/members.yaml +0 -7
  193. data/test/source/_data/products.yml +0 -4
  194. data/test/source/_drafts/draft-properties.text +0 -11
  195. data/test/source/_includes/include.html +0 -1
  196. data/test/source/_includes/params.html +0 -7
  197. data/test/source/_includes/sig.markdown +0 -3
  198. data/test/source/_layouts/default.html +0 -27
  199. data/test/source/_layouts/post/simple.html +0 -1
  200. data/test/source/_layouts/simple.html +0 -1
  201. data/test/source/_methods/_do_not_read_me.md +0 -5
  202. data/test/source/_methods/configuration.md +0 -8
  203. data/test/source/_methods/sanitized_path.md +0 -5
  204. data/test/source/_methods/site/_dont_include_me_either.md +0 -5
  205. data/test/source/_methods/site/generate.md +0 -6
  206. data/test/source/_methods/site/initialize.md +0 -4
  207. data/test/source/_methods/um_hi.md +0 -6
  208. data/test/source/_plugins/dummy.rb +0 -8
  209. data/test/source/_posts/2008-02-02-not-published.textile +0 -8
  210. data/test/source/_posts/2008-02-02-published.textile +0 -8
  211. data/test/source/_posts/2008-10-18-foo-bar.textile +0 -8
  212. data/test/source/_posts/2008-11-21-complex.textile +0 -8
  213. data/test/source/_posts/2008-12-03-permalinked-post.textile +0 -9
  214. data/test/source/_posts/2008-12-13-include.markdown +0 -8
  215. data/test/source/_posts/2009-01-27-array-categories.textile +0 -10
  216. data/test/source/_posts/2009-01-27-categories.textile +0 -7
  217. data/test/source/_posts/2009-01-27-category.textile +0 -7
  218. data/test/source/_posts/2009-01-27-empty-categories.textile +0 -7
  219. data/test/source/_posts/2009-01-27-empty-category.textile +0 -7
  220. data/test/source/_posts/2009-01-27-no-category.textile +0 -6
  221. data/test/source/_posts/2009-03-12-hash-#1.markdown +0 -6
  222. data/test/source/_posts/2009-05-18-empty-tag.textile +0 -6
  223. data/test/source/_posts/2009-05-18-empty-tags.textile +0 -6
  224. data/test/source/_posts/2009-05-18-tag.textile +0 -6
  225. data/test/source/_posts/2009-05-18-tags.textile +0 -9
  226. data/test/source/_posts/2009-06-22-empty-yaml.textile +0 -3
  227. data/test/source/_posts/2009-06-22-no-yaml.textile +0 -1
  228. data/test/source/_posts/2010-01-08-triple-dash.markdown +0 -5
  229. data/test/source/_posts/2010-01-09-date-override.textile +0 -7
  230. data/test/source/_posts/2010-01-09-time-override.textile +0 -7
  231. data/test/source/_posts/2010-01-09-timezone-override.textile +0 -7
  232. data/test/source/_posts/2010-01-16-override-data.textile +0 -4
  233. data/test/source/_posts/2011-04-12-md-extension.md +0 -7
  234. data/test/source/_posts/2011-04-12-text-extension.text +0 -0
  235. data/test/source/_posts/2013-01-02-post-excerpt.markdown +0 -14
  236. data/test/source/_posts/2013-01-12-nil-layout.textile +0 -6
  237. data/test/source/_posts/2013-01-12-no-layout.textile +0 -5
  238. data/test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep +0 -0
  239. data/test/source/_posts/2013-04-11-custom-excerpt.markdown +0 -10
  240. data/test/source/_posts/2013-05-10-number-category.textile +0 -7
  241. data/test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown +0 -23
  242. data/test/source/_posts/2013-08-01-mkdn-extension.mkdn +0 -0
  243. data/test/source/_posts/2013-12-17-include-variable-filters.markdown +0 -21
  244. data/test/source/_posts/2013-12-20-properties.text +0 -11
  245. data/test/source/_posts/2014-01-06-permalink-traversal.md +0 -5
  246. data/test/source/_posts/2014-03-03-yaml-with-dots.md +0 -5
  247. data/test/source/_posts/2014-03-22-escape-+ %20[].markdown +0 -6
  248. data/test/source/_posts/es/2008-11-21-nested.textile +0 -8
  249. data/test/source/_sass/_grid.scss +0 -1
  250. data/test/source/_slides/example-slide-1.html +0 -4
  251. data/test/source/_slides/example-slide-2.html +0 -7
  252. data/test/source/_slides/example-slide-3.html +0 -5
  253. data/test/source/_with.dots/all.dots/2.4.0.md +0 -5
  254. data/test/source/_with.dots/file.with.dots.md +0 -0
  255. data/test/source/about.html +0 -6
  256. data/test/source/category/_posts/2008-9-23-categories.textile +0 -6
  257. data/test/source/contacts.html +0 -5
  258. data/test/source/contacts/bar.html +0 -5
  259. data/test/source/contacts/index.html +0 -5
  260. data/test/source/css/main.scss +0 -4
  261. data/test/source/css/screen.css +0 -76
  262. data/test/source/deal.with.dots.html +0 -7
  263. data/test/source/environment.html +0 -5
  264. data/test/source/exploit.md +0 -5
  265. data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +0 -8
  266. data/test/source/index.html +0 -22
  267. data/test/source/js/coffeescript.coffee +0 -10
  268. data/test/source/pgp.key +0 -2
  269. data/test/source/products.yml +0 -4
  270. data/test/source/properties.html +0 -8
  271. data/test/source/sitemap.xml +0 -32
  272. data/test/source/static_files.html +0 -4
  273. data/test/source/symlink-test/symlinked-file +0 -22
  274. data/test/source/unpublished.html +0 -7
  275. data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +0 -7
  276. data/test/source/z_category/_posts/2008-9-23-categories.textile +0 -6
  277. data/test/suite.rb +0 -11
  278. data/test/test_cleaner.rb +0 -77
  279. data/test/test_coffeescript.rb +0 -49
  280. data/test/test_collections.rb +0 -224
  281. data/test/test_command.rb +0 -53
  282. data/test/test_configuration.rb +0 -201
  283. data/test/test_convertible.rb +0 -49
  284. data/test/test_document.rb +0 -193
  285. data/test/test_draft.rb +0 -56
  286. data/test/test_entry_filter.rb +0 -124
  287. data/test/test_excerpt.rb +0 -131
  288. data/test/test_filters.rb +0 -207
  289. data/test/test_generated_site.rb +0 -97
  290. data/test/test_kramdown.rb +0 -62
  291. data/test/test_layout_reader.rb +0 -34
  292. data/test/test_liquid_extensions.rb +0 -31
  293. data/test/test_log_adapter.rb +0 -59
  294. data/test/test_new_command.rb +0 -104
  295. data/test/test_page.rb +0 -254
  296. data/test/test_path_sanitization.rb +0 -18
  297. data/test/test_post.rb +0 -741
  298. data/test/test_rdiscount.rb +0 -22
  299. data/test/test_redcarpet.rb +0 -77
  300. data/test/test_redcloth.rb +0 -86
  301. data/test/test_related_posts.rb +0 -47
  302. data/test/test_sass.rb +0 -26
  303. data/test/test_site.rb +0 -452
  304. data/test/test_tags.rb +0 -509
  305. data/test/test_url.rb +0 -28
  306. data/test/test_utils.rb +0 -67
@@ -1,146 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Upgrading
4
- prev_section: resources
5
- next_section: contributing
6
- permalink: /docs/upgrading/
7
- ---
8
-
9
- Upgrading from an older version of Jekyll? A few things have changed in 1.0
10
- that you'll want to know about.
11
-
12
- Before we dive in, go ahead and fetch the latest version of Jekyll:
13
-
14
- {% highlight bash %}
15
- $ gem update jekyll
16
- {% endhighlight %}
17
-
18
- <div class="note feature">
19
- <h5 markdown="1">Diving in</h5>
20
- <p markdown="1">Want to get a new Jekyll site up and running quickly? Simply
21
- run <code>jekyll new SITENAME</code> to create a new folder with a bare bones
22
- Jekyll site.</p>
23
- </div>
24
-
25
- ### The Jekyll Command
26
-
27
- For better clarity, Jekyll now accepts the commands `build` and `serve`.
28
- Whereas before you might simply run the command `jekyll` to generate a site
29
- and `jekyll --server` to view it locally, now use the subcommands `jekyll build`
30
- and `jekyll serve` to do the same. And if you want Jekyll to automatically
31
- rebuild each time a file changes, just add the `--watch` flag at the end.
32
-
33
- <div class="note info">
34
- <h5>Watching and Serving</h5>
35
- <p markdown="1">With the new subcommands, the way sites are previewed locally
36
- changed a bit. Instead of specifying `server: true` in the site's
37
- configuration file, use `jekyll serve`. The same hold's true for
38
- `watch: true`. Instead, use the `--watch` flag with either `jekyll serve`
39
- or `jekyll build`.</p>
40
- </div>
41
-
42
- ### Absolute Permalinks
43
-
44
- In Jekyll v1.0, we introduced absolute permalinks for pages in subdirectories.
45
- Until v2.0, it is **opt-in**. Starting with v2.0, however, absolute permalinks
46
- will become **opt-out**, meaning Jekyll will default to using absolute permalinks
47
- instead of relative permalinks.
48
-
49
- * To use absolute permalinks, set `relative_permalinks: false` in your configuration file.
50
- * To continue using relative permalinks, set `relative_permalinks: true` in your configuration file.
51
-
52
- <div class="note warning" id="absolute-permalinks-warning">
53
- <h5 markdown="1">Absolute permalinks will be default in v2.0 and on</h5>
54
- <p markdown="1">
55
- Starting with Jekyll v2.0, `relative_permalinks` will default to `false`,
56
- meaning all pages will be built using the absolute permalink behaviour.
57
- The switch will still exist until v2.0.
58
- </p>
59
- </div>
60
-
61
- ### Draft Posts
62
-
63
- Jekyll now lets you write draft posts, and allows you to easily preview how
64
- they will look prior to publishing. To start a draft, simply create a folder
65
- called `_drafts` in your site's source directory (e.g., alongside `_posts`),
66
- and add a new markdown file to it. To preview your new post, simply run the
67
- `jekyll serve` command with the `--drafts` flag.
68
-
69
- <div class="note info">
70
- <h5 markdown="1">Drafts don't have dates</h5>
71
- <p markdown="1">
72
- Unlike posts, drafts don't have a date, since they haven't
73
- been published yet. Rather than naming your draft something like
74
- `2013-07-01-my-draft-post.md`, simply name the file what you'd like your
75
- post to eventually be titled, here `my-draft-post.md`.</p>
76
- </div>
77
-
78
- ### Custom Config File
79
-
80
- Rather than passing individual flags via the command line, you can now pass an
81
- entire custom Jekyll config file. This helps to distinguish between
82
- environments, or lets you programmatically override user-specified defaults.
83
- Simply add the `--config` flag to the `jekyll` command, followed by the path
84
- to one or more config files (comma-delimited, no spaces).
85
-
86
- #### As a result, the following command line flags are now deprecated:
87
-
88
- * `--no-server`
89
- * `--no-auto`
90
- * `--auto` (now `--watch`)
91
- * `--server`
92
- * `--url=`
93
- * `--maruku`, `--rdiscount`, and `--redcarpet`
94
- * `--pygments`
95
- * `--permalink=`
96
- * `--paginate`
97
-
98
- <div class="note info">
99
- <h5>The config flag explicitly specifies your configuration file(s)</h5>
100
- <p markdown="1">If you use the `--config` flag, Jekyll will ignore your
101
- `_config.yml` file. Want to merge a custom configuration with the normal
102
- configuration? No problem. Jekyll will accept more than one custom config
103
- file via the command line. Config files cascade from right to left, such
104
- that if I run `jekyll serve --config _config.yml,_config-dev.yml`,
105
- the values in the config files on the right (`_config-dev.yml`) overwrite
106
- those on the left (`_config.yml`) when both contain the same key.</p>
107
- </div>
108
-
109
- ### New Config File Options
110
-
111
- Jekyll 1.0 introduced several new config file options. Before you upgrade, you
112
- should check to see if any of these are present in your pre-1.0 config file, and
113
- if so, make sure that you're using them properly:
114
-
115
- * `excerpt_separator`
116
- * `host`
117
- * `include`
118
- * `keep_files`
119
- * `layouts`
120
- * `show_drafts`
121
- * `timezone`
122
- * `url`
123
-
124
- ### Baseurl
125
-
126
- Often, you'll want the ability to run a Jekyll site in multiple places, such as
127
- previewing locally before pushing to GitHub Pages. Jekyll 1.0 makes that
128
- easier with the new `--baseurl` flag. To take advantage of this feature, first
129
- add the production `baseurl` to your site's `_config.yml` file. Then,
130
- throughout the site, simply prefix relative URLs with `{% raw %}{{ site.baseurl }}{% endraw %}`.
131
- When you're ready to preview your site locally, pass along the `--baseurl` flag
132
- with your local baseurl (most likely `/`) to `jekyll serve` and Jekyll will
133
- swap in whatever you've passed along, ensuring all your links work as you'd
134
- expect in both environments.
135
-
136
-
137
- <div class="note warning">
138
- <h5 markdown="1">All page and post URLs contain leading slashes</h5>
139
- <p markdown="1">If you use the method described above, please remember
140
- that the URLs for all posts and pages contain a leading slash. Therefore,
141
- concatenating the site baseurl and the post/page url where
142
- `site.baseurl = /` and `post.url = /2013/06/05/my-fun-post/` will
143
- result in two leading slashes, which will break links. It is thus
144
- suggested that prefixing with `site.baseurl` only be used when the
145
- `baseurl` is something other than the default of `/`.</p>
146
- </div>
@@ -1,74 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Basic Usage
4
- prev_section: installation
5
- next_section: structure
6
- permalink: /docs/usage/
7
- ---
8
-
9
- The Jekyll gem makes a `jekyll` executable available to you in your Terminal
10
- window. You can use this command in a number of ways:
11
-
12
- {% highlight bash %}
13
- $ jekyll build
14
- # => The current folder will be generated into ./_site
15
-
16
- $ jekyll build --destination <destination>
17
- # => The current folder will be generated into <destination>
18
-
19
- $ jekyll build --source <source> --destination <destination>
20
- # => The <source> folder will be generated into <destination>
21
-
22
- $ jekyll build --watch
23
- # => The current folder will be generated into ./_site,
24
- # watched for changes, and regenerated automatically.
25
- {% endhighlight %}
26
-
27
- <div class="note warning">
28
- <h5>Destination folders are cleaned on site builds</h5>
29
- <p>
30
- The contents of <code>&lt;destination&gt;</code> are automatically
31
- cleaned when the site is built. Files or folders that are not
32
- created by your site will be removed. Do not use an important
33
- location for <code>&lt;destination&gt;</code>; instead, use it as
34
- a staging area and copy files from there to your web server.
35
- </p>
36
- </div>
37
-
38
- Jekyll also comes with a built-in development server that will allow you to
39
- preview what the generated site will look like in your browser locally.
40
-
41
- {% highlight bash %}
42
- $ jekyll serve
43
- # => A development server will run at http://localhost:4000/
44
-
45
- $ jekyll serve --detach
46
- # => Same as `jekyll serve` but will detach from the current terminal.
47
- # If you need to kill the server, you can `kill -9 1234` where "1234" is the PID.
48
- # If you cannot find the PID, then do, `ps aux | grep jekyll` and kill the instance. [Read more](http://unixhelp.ed.ac.uk/shell/jobz5.html).
49
-
50
- $ jekyll serve --watch
51
- # => Same as `jekyll serve`, but watch for changes and regenerate automatically.
52
- {% endhighlight %}
53
-
54
- These are just a few of the available [configuration options](../configuration/).
55
- Many configuration options can either be specified as flags on the command line,
56
- or alternatively (and more commonly) they can be specified in a `_config.yml`
57
- file at the root of the source directory. Jekyll will automatically use the
58
- options from this file when run. For example, if you place the following lines
59
- in your `_config.yml` file:
60
-
61
- {% highlight yaml %}
62
- source: _source
63
- destination: _deploy
64
- {% endhighlight %}
65
-
66
- Then the following two commands will be equivalent:
67
-
68
- {% highlight bash %}
69
- $ jekyll build
70
- $ jekyll build --source _source --destination _deploy
71
- {% endhighlight %}
72
-
73
- For more about the possible configuration options, see the
74
- [configuration](../configuration/) page.
@@ -1,382 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Variables
4
- prev_section: pages
5
- next_section: collections
6
- permalink: /docs/variables/
7
- ---
8
-
9
- Jekyll traverses your site looking for files to process. Any files with [YAML
10
- Front Matter](../frontmatter/) are subject to processing. For each of these
11
- files, Jekyll makes a variety of data available via the [Liquid templating
12
- system](http://wiki.shopify.com/Liquid). The
13
- following is a reference of the available data.
14
-
15
- ## Global Variables
16
-
17
- <div class="mobile-side-scroller">
18
- <table>
19
- <thead>
20
- <tr>
21
- <th>Variable</th>
22
- <th>Description</th>
23
- </tr>
24
- </thead>
25
- <tbody>
26
- <tr>
27
- <td><p><code>site</code></p></td>
28
- <td><p>
29
-
30
- Sitewide information + configuration settings from
31
- <code>_config.yml</code>. See below for details.
32
-
33
- </p></td>
34
- </tr>
35
- <tr>
36
- <td><p><code>page</code></p></td>
37
- <td><p>
38
-
39
- Page specific information + the <a href="../frontmatter/">YAML Front
40
- Matter</a>. Custom variables set via the YAML front matter will be
41
- available here. See below for details.
42
-
43
- </p></td>
44
- </tr>
45
- <tr>
46
- <td><p><code>content</code></p></td>
47
- <td><p>
48
-
49
- In layout files, the rendered content of the Post or Page being wrapped.
50
- Not defined in Post or Page files.
51
-
52
- </p></td>
53
- </tr>
54
- <tr>
55
- <td><p><code>paginator</code></p></td>
56
- <td><p>
57
-
58
- When the <code>paginate</code> configuration option is set, this
59
- variable becomes available for use. See <a
60
- href="../pagination/">Pagination</a> for details.
61
-
62
- </p></td>
63
- </tr>
64
- </tbody>
65
- </table>
66
- </div>
67
-
68
- ## Site Variables
69
-
70
- <div class="mobile-side-scroller">
71
- <table>
72
- <thead>
73
- <tr>
74
- <th>Variable</th>
75
- <th>Description</th>
76
- </tr>
77
- </thead>
78
- <tbody>
79
- <tr>
80
- <td><p><code>site.time</code></p></td>
81
- <td><p>
82
-
83
- The current time (when you run the <code>jekyll</code> command).
84
-
85
- </p></td>
86
- </tr>
87
- <tr>
88
- <td><p><code>site.pages</code></p></td>
89
- <td><p>
90
-
91
- A list of all Pages.
92
-
93
- </p></td>
94
- </tr>
95
- <tr>
96
- <td><p><code>site.posts</code></p></td>
97
- <td><p>
98
-
99
- A reverse chronological list of all Posts.
100
-
101
- </p></td>
102
- </tr>
103
- <tr>
104
- <td><p><code>site.related_posts</code></p></td>
105
- <td><p>
106
-
107
- If the page being processed is a Post, this contains a list of up to ten
108
- related Posts. By default, these are low quality but fast to compute.
109
- For high quality but slow to compute results, run the
110
- <code>jekyll</code> command with the <code>--lsi</code> (latent semantic
111
- indexing) option.
112
-
113
- </p></td>
114
- </tr>
115
- <tr>
116
- <td><p><code>site.static_files</code></p></td>
117
- <td><p>
118
-
119
- A list of all static files (i.e. files not processed by Jekyll's
120
- converters or the Liquid renderer). Each file has three properties:
121
- <code>path</code>, <code>modified_time</code> and <code>extname</code>.
122
-
123
- </p></td>
124
- </tr>
125
- <tr>
126
- <td><p><code>site.html_pages</code></p></td>
127
- <td><p>
128
-
129
- A list of all HTML Pages.
130
-
131
- </p></td>
132
- </tr>
133
- <tr>
134
- <td><p><code>site.collections</code></p></td>
135
- <td><p>
136
-
137
- A list of all the collections.
138
-
139
- </p></td>
140
- </tr>
141
- <tr>
142
- <td><p><code>site.data</code></p></td>
143
- <td><p>
144
-
145
- A list containing the data loaded from the YAML files located in the <code>_data</code> directory.
146
-
147
- </p></td>
148
- </tr>
149
- <tr>
150
- <td><p><code>site.documents</code></p></td>
151
- <td><p>
152
-
153
- A list of all the documents in every collection.
154
-
155
- </p></td>
156
- </tr>
157
- <tr>
158
- <td><p><code>site.categories.CATEGORY</code></p></td>
159
- <td><p>
160
-
161
- The list of all Posts in category <code>CATEGORY</code>.
162
-
163
- </p></td>
164
- </tr>
165
- <tr>
166
- <td><p><code>site.tags.TAG</code></p></td>
167
- <td><p>
168
-
169
- The list of all Posts with tag <code>TAG</code>.
170
-
171
- </p></td>
172
- </tr>
173
- <tr>
174
- <td><p><code>site.[CONFIGURATION_DATA]</code></p></td>
175
- <td><p>
176
-
177
- All the variables set via the command line and your
178
- <code>_config.yml</code> are available through the <code>site</code>
179
- variable. For example, if you have <code>url: http://mysite.com</code>
180
- in your configuration file, then in your Posts and Pages it will be
181
- stored in <code>site.url</code>. Jekyll does not parse changes to
182
- <code>_config.yml</code> in <code>watch</code> mode, you must restart
183
- Jekyll to see changes to variables.
184
-
185
- </p></td>
186
- </tr>
187
- </tbody>
188
- </table>
189
- </div>
190
-
191
- ## Page Variables
192
-
193
- <div class="mobile-side-scroller">
194
- <table>
195
- <thead>
196
- <tr>
197
- <th>Variable</th>
198
- <th>Description</th>
199
- </tr>
200
- </thead>
201
- <tbody>
202
- <tr>
203
- <td><p><code>page.content</code></p></td>
204
- <td><p>
205
-
206
- The un-rendered content of the Page.
207
-
208
- </p></td>
209
- </tr>
210
- <tr>
211
- <td><p><code>page.title</code></p></td>
212
- <td><p>
213
-
214
- The title of the Page.
215
-
216
- </p></td>
217
- </tr>
218
- <tr>
219
- <td><p><code>page.excerpt</code></p></td>
220
- <td><p>
221
-
222
- The un-rendered excerpt of the Page.
223
-
224
- </p></td>
225
- </tr>
226
- <tr>
227
- <td><p><code>page.url</code></p></td>
228
- <td><p>
229
-
230
- The URL of the Post without the domain, but
231
- with a leading slash, e.g.
232
- <code>/2008/12/14/my-post.html</code>
233
-
234
- </p></td>
235
- </tr>
236
- <tr>
237
- <td><p><code>page.date</code></p></td>
238
- <td><p>
239
-
240
- The Date assigned to the Post. This can be overridden in a Post’s front
241
- matter by specifying a new date/time in the format
242
- <code>YYYY-MM-DD HH:MM:SS</code> (assuming UTC), or
243
- <code>YYYY-MM-DD HH:MM:SS +/-TTTT</code> (to specify a time zone using
244
- an offset from UTC. e.g. <code>2008-12-14 10:30:00 +0900</code>).
245
-
246
- </p></td>
247
- </tr>
248
- <tr>
249
- <td><p><code>page.id</code></p></td>
250
- <td><p>
251
-
252
- An identifier unique to the Post (useful in RSS feeds). e.g.
253
- <code>/2008/12/14/my-post</code>
254
-
255
- </p></td>
256
- </tr>
257
- <tr>
258
- <td><p><code>page.categories</code></p></td>
259
- <td><p>
260
-
261
- The list of categories to which this post belongs. Categories are
262
- derived from the directory structure above the <code>_posts</code>
263
- directory. For example, a post at
264
- <code>/work/code/_posts/2008-12-24-closures.md</code> would have this
265
- field set to <code>['work', 'code']</code>. These can also be specified
266
- in the <a href="../frontmatter/">YAML Front Matter</a>.
267
-
268
- </p></td>
269
- </tr>
270
- <tr>
271
- <td><p><code>page.tags</code></p></td>
272
- <td><p>
273
-
274
- The list of tags to which this post belongs. These can be specified in
275
- the <a href="../frontmatter/">YAML Front Matter</a>.
276
-
277
- </p></td>
278
- </tr>
279
- <tr>
280
- <td><p><code>page.path</code></p></td>
281
- <td><p>
282
-
283
- The path to the raw post or page. Example usage: Linking back to the
284
- page or post’s source on GitHub. This can be overridden in the
285
- <a href="../frontmatter/">YAML Front Matter</a>.
286
-
287
- </p></td>
288
- </tr>
289
- <tr>
290
- <td><p><code>page.next</code></p></td>
291
- <td><p>
292
-
293
- The next post relative to the position of the current post in
294
- <code>site.posts</code>. Returns <code>nil</code> for the last entry.
295
-
296
- </p></td>
297
- </tr>
298
- <tr>
299
- <td><p><code>page.previous</code></p></td>
300
- <td><p>
301
-
302
- The previous post relative to the position of the current post in
303
- <code>site.posts</code>. Returns <code>nil</code> for the first entry.
304
-
305
- </p></td>
306
- </tr>
307
- </tbody>
308
- </table>
309
- </div>
310
-
311
- <div class="note">
312
- <h5>ProTip™: Use custom front-matter</h5>
313
- <p>
314
-
315
- Any custom front matter that you specify will be available under
316
- <code>page</code>. For example, if you specify <code>custom_css: true</code>
317
- in a page’s front matter, that value will be available as
318
- <code>page.custom_css</code>.
319
-
320
- </p>
321
- </div>
322
-
323
- ## Paginator
324
-
325
- <div class="mobile-side-scroller">
326
- <table>
327
- <thead>
328
- <tr>
329
- <th>Variable</th>
330
- <th>Description</th>
331
- </tr>
332
- </thead>
333
- <tbody>
334
- <tr>
335
- <td><p><code>paginator.per_page</code></p></td>
336
- <td><p>Number of Posts per page.</p></td>
337
- </tr>
338
- <tr>
339
- <td><p><code>paginator.posts</code></p></td>
340
- <td><p>Posts available for that page.</p></td>
341
- </tr>
342
- <tr>
343
- <td><p><code>paginator.total_posts</code></p></td>
344
- <td><p>Total number of Posts.</p></td>
345
- </tr>
346
- <tr>
347
- <td><p><code>paginator.total_pages</code></p></td>
348
- <td><p>Total number of Pages.</p></td>
349
- </tr>
350
- <tr>
351
- <td><p><code>paginator.page</code></p></td>
352
- <td><p>The number of the current page.</p></td>
353
- </tr>
354
- <tr>
355
- <td><p><code>paginator.previous_page</code></p></td>
356
- <td><p>The number of the previous page.</p></td>
357
- </tr>
358
- <tr>
359
- <td><p><code>paginator.previous_page_path</code></p></td>
360
- <td><p>The path to the previous page.</p></td>
361
- </tr>
362
- <tr>
363
- <td><p><code>paginator.next_page</code></p></td>
364
- <td><p>The number of the next page.</p></td>
365
- </tr>
366
- <tr>
367
- <td><p><code>paginator.next_page_path</code></p></td>
368
- <td><p>The path to the next page.</p></td>
369
- </tr>
370
- </tbody>
371
- </table>
372
- </div>
373
-
374
- <div class="note info">
375
- <h5>Paginator variable availability</h5>
376
- <p>
377
-
378
- These are only available in index files, however they can be located in a
379
- subdirectory, such as <code>/blog/index.html</code>.
380
-
381
- </p>
382
- </div>