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,30 +0,0 @@
1
- ---
2
- layout: news_item
3
- title: 'Jekyll 2.1.1 Released'
4
- date: 2014-07-01 20:16:43 -0400
5
- author: parkr
6
- version: 2.1.1
7
- categories: [release]
8
- ---
9
-
10
- This is a minor release for Jekyll 2.1.0. It fixes a couple bugs and
11
- introduces fixes for a couple security-related issues.
12
-
13
- It covers two security vulnerabilities:
14
-
15
- 1. One in the reading of data
16
- 2. One in the `layouts` setting
17
-
18
- They were identified in Jekyll 1.5.1 and has been confirmed as patched
19
- in this version and the version used by GitHub Pages. If you are in the
20
- business of building Jekyll sites, please ensure you upgrade to 2.1.1 as
21
- soon as possible.
22
-
23
- For more, check out [`jekyll/jekyll#2563`](https://github.com/jekyll/jekyll/pull/2563).
24
-
25
- Additionally, the dependency on Maruku has been loosened and a bug was
26
- fixed with document URLs.
27
-
28
- As always, check out the [full changelog](/docs/history/) for more info!
29
-
30
- Happy Jekylling!
@@ -1,19 +0,0 @@
1
- ---
2
- layout: news_item
3
- title: 'Jekyll 2.2.0 Released'
4
- date: 2014-07-29 18:59:13 -0400
5
- author: parkr
6
- version: 2.2.0
7
- categories: [release]
8
- ---
9
-
10
- Jekyll 2.2.0 contains a few key updates:
11
-
12
- 1. A warning will now fire if you specify a layout in any of your pages or
13
- posts that doesn't exist.
14
- 2. Certain Pygments options are now whitelisted in safe mode
15
- 3. Categories in a post's path are now respected (i.e. folders in `_posts`
16
- will now work properly).
17
-
18
- As always, a full list of the updates are on the
19
- [history page](/docs/history#v2-2-0). Happy Jekylling!
@@ -1,31 +0,0 @@
1
- ---
2
- ---
3
-
4
- {% capture screen %}
5
- /* *\
6
- * $normalize.css *
7
- \* */
8
- {% include css/normalize.css %}
9
- /* *\
10
- * $gridism.css *
11
- \* */
12
- {% include css/gridism.css %}
13
- /* *\
14
- * $style.css *
15
- \* */
16
- {% include css/style.css %}
17
- /* *\
18
- * $pygments.css *
19
- \* */
20
- {% include css/pygments.css %}
21
- /* *\
22
- * $font-awesome.css *
23
- \* */
24
- {% include css/font-awesome.css %}
25
- {% endcapture %}
26
-
27
- {% if site.GH_ENV %}
28
- {{ screen | strip_newlines | remove: ' ' }}
29
- {% else %}
30
- {{ screen }}
31
- {% endif %}
@@ -1,66 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Assets
4
- prev_section: datafiles
5
- next_section: migrations
6
- permalink: /docs/assets/
7
- ---
8
-
9
- Jekyll provides built-in support for Sass and CoffeeScript. In order to use
10
- them, create a file with the proper extension name (one of `.sass`, `.scss`,
11
- or `.coffee`) and start the file with two lines of triple dashes, like this:
12
-
13
- {% highlight sass %}
14
- ---
15
- ---
16
-
17
- // start content
18
- .my-definition
19
- font-size: 1.2em
20
- {% endhighlight %}
21
-
22
- Jekyll treats these files the same as a regular page, in that the output file
23
- will be placed in the same directory that it came from. For instance, if you
24
- have a file named `css/styles.scss` in your site's source folder, Jekyll
25
- will process it and put it in your site's destination folder under
26
- `css/styles.css`.
27
-
28
- ## Sass/SCSS
29
-
30
- Jekyll allows you to customize your Sass conversion in certain ways.
31
-
32
- If you are using Sass `@import` statements, you'll need to ensure that your
33
- `sass_dir` is set to the base directory that contains your Sass files. You
34
- can do that thusly:
35
-
36
- {% highlight yaml %}
37
- sass:
38
- sass_dir: _sass
39
- {% endhighlight %}
40
-
41
- The Sass converter will default the `sass_dir` configuration option to
42
- `_sass`.
43
-
44
- <div class="note info">
45
- <h5>The <code>sass_dir</code> is only used by Sass</h5>
46
- <p>
47
-
48
- Note that the `sass_dir` becomes the load path for Sass imports,
49
- nothing more. This means that Jekyll does not know about these files
50
- directly, so any files here should not contain the YAML front matter as
51
- described above nor will they be transformed as described above. This
52
- folder should only contain imports.
53
-
54
- </p>
55
- </div>
56
-
57
- You may also specify the output style with the `style` option in your
58
- `_config.yml` file:
59
-
60
- {% highlight yaml %}
61
- sass:
62
- style: :compressed
63
- {% endhighlight %}
64
-
65
- These are passed to Sass, so any output style options Sass supports are valid
66
- here, too.
@@ -1,259 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Collections
4
- prev_section: variables
5
- next_section: datafiles
6
- permalink: /docs/collections/
7
- ---
8
-
9
- <div class="note warning">
10
- <h5>Collections support is unstable and may change</h5>
11
- <p>
12
- This is an experimental feature and that the API may likely change until the feature stabilizes.
13
- </p>
14
- </div>
15
-
16
- Not everything is a post or a page. Maybe you want to document the various methods in your open source project, members of a team, or talks at a conference. Collections allow you to define a new type of document that behave like Pages or Posts do normally, but also have their own unique properties and namespace.
17
-
18
- ## Using Collections
19
-
20
- ### Step 1: Tell Jekyll to read in your collection
21
-
22
- Add the following to your site's `_config.yml` file, replacing `my_collection` with the name of your collection:
23
-
24
- {% highlight yaml %}
25
- collections:
26
- - my_collection
27
- {% endhighlight %}
28
-
29
- You can optionally specify metadata for your collection in the configuration:
30
-
31
- {% highlight yaml %}
32
- collections:
33
- my_collection:
34
- foo: bar
35
- {% endhighlight %}
36
-
37
- ### Step 2: Add your content
38
-
39
- Create a corresponding folder (e.g. `<source>/_my_collection`) and add documents.
40
- YAML front-matter is read in as data if it exists, if not, then everything is just stuck in the Document's `content` attribute.
41
-
42
- Note: the folder must be named identical to the collection you defined in you config.yml file, with the addition of the preceding `_` character.
43
-
44
- ### Step 3: Optionally render your collection's documents into independent files
45
-
46
- If you'd like Jekyll to create a public-facing, rendered version of each document in your collection, set the `output` key to `true` in your collection metadata in your `_config.yml`:
47
-
48
- {% highlight yaml %}
49
- collections:
50
- my_collection:
51
- output: true
52
- {% endhighlight %}
53
-
54
- This will produce a file for each document in the collection.
55
- For example, if you have `_my_collection/some_subdir/some_doc.md`,
56
- it will be rendered using Liquid and the Markdown converter of your
57
- choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`.
58
-
59
- As for posts with [Permalinks](../permalinks/), document URL can be customized by setting a `permalink` metadata to the collection:
60
-
61
- {% highlight yaml %}
62
- collections:
63
- my_collection:
64
- output: true
65
- permalink: /awesome/:path/
66
- {% endhighlight %}
67
-
68
- For example, if you have `_my_collection/some_subdir/some_doc.md`, it will be written out to `<dest>/awesome/some_subdir/some_doc/index.html`.
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>
81
- <p><code>collection</code></p>
82
- </td>
83
- <td>
84
- <p>Label of the containing collection</p>
85
- </td>
86
- </tr>
87
- <tr>
88
- <td>
89
- <p><code>path</code></p>
90
- </td>
91
- <td>
92
- <p>Path to the document relative to the collection's directory</p>
93
- </td>
94
- </tr>
95
- <tr>
96
- <td>
97
- <p><code>output_ext</code></p>
98
- </td>
99
- <td>
100
- <p>Extension of the output file</p>
101
- </td>
102
- </tr>
103
- </tbody>
104
- </table>
105
- </div>
106
-
107
- ## Liquid Attributes
108
-
109
- ### Collections
110
-
111
- Each collection is accessible via the `site` Liquid variable. For example, if you want to access the `albums` collection found in `_albums`, you'd use `site.albums`. Each collection is itself an array of documents (e.g. `site.albums` is an array of documents, much like `site.pages` and `site.posts`). See below for how to access attributes of those documents.
112
-
113
- The collections are also available under `site.collections`, with the metadata you specified in your `_config.yml` (if present) and the following information:
114
-
115
- <div class="mobile-side-scroller">
116
- <table>
117
- <thead>
118
- <tr>
119
- <th>Variable</th>
120
- <th>Description</th>
121
- </tr>
122
- </thead>
123
- <tbody>
124
- <tr>
125
- <td>
126
- <p><code>label</code></p>
127
- </td>
128
- <td>
129
- <p>
130
- The name of your collection, e.g. <code>my_collection</code>.
131
- </p>
132
- </td>
133
- </tr>
134
- <tr>
135
- <td>
136
- <p><code>docs</code></p>
137
- </td>
138
- <td>
139
- <p>
140
- An array of <a href="#documents">documents</a>.
141
- </p>
142
- </td>
143
- </tr>
144
- <tr>
145
- <td>
146
- <p><code>relative_directory</code></p>
147
- </td>
148
- <td>
149
- <p>
150
- The path to the collections's source directory, relative to the site source.
151
- </p>
152
- </td>
153
- </tr>
154
- <tr>
155
- <td>
156
- <p><code>directory</code></p>
157
- </td>
158
- <td>
159
- <p>
160
- The full path to the collections's source directory.
161
- </p>
162
- </td>
163
- </tr>
164
- <tr>
165
- <td>
166
- <p><code>output</code></p>
167
- </td>
168
- <td>
169
- <p>
170
- Whether the collection's documents will be output as individual files.
171
- </p>
172
- </td>
173
- </tr>
174
- </tbody>
175
- </table>
176
- </div>
177
-
178
-
179
- ### Documents
180
-
181
- In addition to any YAML front-matter provided in the document's corresponding file, each document has the following attributes:
182
-
183
- <div class="mobile-side-scroller">
184
- <table>
185
- <thead>
186
- <tr>
187
- <th>Variable</th>
188
- <th>Description</th>
189
- </tr>
190
- </thead>
191
- <tbody>
192
- <tr>
193
- <td>
194
- <p><code>content</code></p>
195
- </td>
196
- <td>
197
- <p>
198
- The (unrendered) content of the document. If no YAML front-matter is provided,
199
- this is the entirety of the file contents. If YAML front-matter
200
- is used, then this is all the contents of the file after the terminating
201
- `---` of the front-matter.
202
- </p>
203
- </td>
204
- </tr>
205
- <tr>
206
- <td>
207
- <p><code>output</code></p>
208
- </td>
209
- <td>
210
- <p>
211
- The rendered output of the document, based on the <code>content</code>.
212
- </p>
213
- </td>
214
- </tr>
215
- <tr>
216
- <td>
217
- <p><code>path</code></p>
218
- </td>
219
- <td>
220
- <p>
221
- The full path to the document's source file.
222
- </p>
223
- </td>
224
- </tr>
225
- <tr>
226
- <td>
227
- <p><code>relative_path</code></p>
228
- </td>
229
- <td>
230
- <p>
231
- The path to the document's source file relative to the site source.
232
- </p>
233
- </td>
234
- </tr>
235
- <tr>
236
- <td>
237
- <p><code>url</code></p>
238
- </td>
239
- <td>
240
- <p>
241
- The URL of the rendered collection. The file is only written to the
242
- destination when the name of the collection to which it belongs is
243
- included in the <code>render</code> key in the site's configuration file.
244
- </p>
245
- </td>
246
- </tr>
247
- <tr>
248
- <td>
249
- <p><code>collection</code></p>
250
- </td>
251
- <td>
252
- <p>
253
- The name of the document's collection.
254
- </p>
255
- </td>
256
- </tr>
257
- </tbody>
258
- </table>
259
- </div>
@@ -1,536 +0,0 @@
1
- ---
2
- layout: docs
3
- title: Configuration
4
- prev_section: structure
5
- next_section: frontmatter
6
- permalink: /docs/configuration/
7
- ---
8
-
9
- Jekyll allows you to concoct your sites in any way you can dream up, and it’s
10
- thanks to the powerful and flexible configuration options that this is possible.
11
- These options can either be specified in a `_config.yml` file placed in your
12
- site’s root directory, or can be specified as flags for the `jekyll` executable
13
- in the terminal.
14
-
15
- ## Configuration Settings
16
-
17
- ### Global Configuration
18
-
19
- The table below lists the available settings for Jekyll, and the various <code
20
- class="option">options</code> (specified in the configuration file) and <code
21
- class="flag">flags</code> (specified on the command-line) that control them.
22
-
23
- <div class="mobile-side-scroller">
24
- <table>
25
- <thead>
26
- <tr>
27
- <th>Setting</th>
28
- <th>
29
- <span class="option">Options</span> and <span class="flag">Flags</span>
30
- </th>
31
- </tr>
32
- </thead>
33
- <tbody>
34
- <tr class="setting">
35
- <td>
36
- <p class="name"><strong>Site Source</strong></p>
37
- <p class="description">Change the directory where Jekyll will read files</p>
38
- </td>
39
- <td class="align-center">
40
- <p><code class="option">source: DIR</code></p>
41
- <p><code class="flag">-s, --source DIR</code></p>
42
- </td>
43
- </tr>
44
- <tr class="setting">
45
- <td>
46
- <p class="name"><strong>Site Destination</strong></p>
47
- <p class="description">Change the directory where Jekyll will write files</p>
48
- </td>
49
- <td class="align-center">
50
- <p><code class="option">destination: DIR</code></p>
51
- <p><code class="flag">-d, --destination DIR</code></p>
52
- </td>
53
- </tr>
54
- <tr class="setting">
55
- <td>
56
- <p class="name"><strong>Safe</strong></p>
57
- <p class="description">Disable <a href="../plugins/">custom plugins, and ignore symbolic links</a>.</p>
58
- </td>
59
- <td class="align-center">
60
- <p><code class="option">safe: BOOL</code></p>
61
- <p><code class="flag">--safe</code></p>
62
- </td>
63
- </tr>
64
- <tr class="setting">
65
- <td>
66
- <p class="name"><strong>Exclude</strong></p>
67
- <p class="description">
68
- Exclude directories and/or files from the
69
- conversion. These exclusions are relative to the site's
70
- source directory and cannot be outside the source directory.
71
- </p>
72
- </td>
73
- <td class="align-center">
74
- <p><code class="option">exclude: [DIR, FILE, ...]</code></p>
75
- </td>
76
- </tr>
77
- <tr class="setting">
78
- <td>
79
- <p class="name"><strong>Include</strong></p>
80
- <p class="description">
81
- Force inclusion of directories and/or files in the conversion.
82
- <code>.htaccess</code> is a good example since dotfiles are excluded
83
- by default.
84
- </p>
85
- </td>
86
- <td class="align-center">
87
- <p><code class="option">include: [DIR, FILE, ...]</code></p>
88
- </td>
89
- </tr>
90
- <tr class="setting">
91
- <td>
92
- <p class="name"><strong>Time Zone</strong></p>
93
- <p class="description">
94
- Set the time zone for site generation. This sets the <code>TZ</code>
95
- environment variable, which Ruby uses to handle time and date
96
- creation and manipulation. Any entry from the
97
- <a href="http://en.wikipedia.org/wiki/Tz_database">IANA Time Zone
98
- Database</a> is valid, e.g. <code>America/New_York</code>. A list of all
99
- available values can be found <a href="http://en.wikipedia.org/wiki/List_of_tz_database_time_zones">
100
- here</a>. The default is the local time zone, as set by your operating system.
101
- </p>
102
- </td>
103
- <td class="align-center">
104
- <p><code class="option">timezone: TIMEZONE</code></p>
105
- </td>
106
- </tr>
107
- <tr class="setting">
108
- <td>
109
- <p class="name"><strong>Encoding</strong></p>
110
- <p class="description">
111
- Set the encoding of files by name. Only available for Ruby
112
- 1.9 or later).
113
- The default value is <code>utf-8</code> starting in 2.0.0,
114
- and <code>nil</code> before 2.0.0, which will yield the Ruby
115
- default of <code>ASCII-8BIT</code>.
116
- Available encodings can be shown by the
117
- command <code>ruby -e 'puts Encoding::list.join("\n")'</code>.
118
- </p>
119
- </td>
120
- <td class="align-center">
121
- <p><code class="option">encoding: ENCODING</code></p>
122
- </td>
123
- </tr>
124
- <tr>
125
- <td>
126
- <p class='name'><strong>Defaults</strong></p>
127
- <p class='description'>
128
- Set defaults for <a href="../frontmatter/" title="YAML frontmatter">YAML frontmatter</a>
129
- variables.
130
- </p>
131
- </td>
132
- <td class='align-center'>
133
- <p>see <a href="#frontmatter-defaults" title="details">below</a></p>
134
- </td>
135
- </tr>
136
- </tbody>
137
- </table>
138
- </div>
139
-
140
- ### Build Command Options
141
-
142
- <div class="mobile-side-scroller">
143
- <table>
144
- <thead>
145
- <tr>
146
- <th>Setting</th>
147
- <th><span class="option">Options</span> and <span class="flag">Flags</span></th>
148
- </tr>
149
- </thead>
150
- <tbody>
151
- <tr class="setting">
152
- <td>
153
- <p class="name"><strong>Regeneration</strong></p>
154
- <p class="description">Enable auto-regeneration of the site when files are modified.</p>
155
- </td>
156
- <td class="align-center">
157
- <p><code class="flag">-w, --watch</code></p>
158
- </td>
159
- </tr>
160
- <tr class="setting">
161
- <td>
162
- <p class="name"><strong>Configuration</strong></p>
163
- <p class="description">Specify config files instead of using <code>_config.yml</code> automatically. Settings in later files override settings in earlier files.</p>
164
- </td>
165
- <td class="align-center">
166
- <p><code class="flag">--config FILE1[,FILE2,...]</code></p>
167
- </td>
168
- </tr>
169
- <tr class="setting">
170
- <td>
171
- <p class="name"><strong>Drafts</strong></p>
172
- <p class="description">Process and render draft posts.</p>
173
- </td>
174
- <td class="align-center">
175
- <p><code class="flag">--drafts</code></p>
176
- </td>
177
- </tr>
178
- <tr class="setting">
179
- <td>
180
- <p class="name"><strong>Future</strong></p>
181
- <p class="description">Publish posts with a future date.</p>
182
- </td>
183
- <td class="align-center">
184
- <p><code class="option">future: BOOL</code></p>
185
- <p><code class="flag">--future</code></p>
186
- </td>
187
- </tr>
188
- <tr class="setting">
189
- <td>
190
- <p class="name"><strong>LSI</strong></p>
191
- <p class="description">Produce an index for related posts.</p>
192
- </td>
193
- <td class="align-center">
194
- <p><code class="option">lsi: BOOL</code></p>
195
- <p><code class="flag">--lsi</code></p>
196
- </td>
197
- </tr>
198
- <tr class="setting">
199
- <td>
200
- <p class="name"><strong>Limit Posts</strong></p>
201
- <p class="description">Limit the number of posts to parse and publish.</p>
202
- </td>
203
- <td class="align-center">
204
- <p><code class="option">limit_posts: NUM</code></p>
205
- <p><code class="flag">--limit_posts NUM</code></p>
206
- </td>
207
- </tr>
208
- </tbody>
209
- </table>
210
- </div>
211
-
212
- ### Serve Command Options
213
-
214
- In addition to the options below, the `serve` sub-command can accept any of the options
215
- for the `build` sub-command, which are then applied to the site build which occurs right
216
- before your site is served.
217
-
218
- <div class="mobile-side-scroller">
219
- <table>
220
- <thead>
221
- <tr>
222
- <th>Setting</th>
223
- <th><span class="option">Options</span> and <span class="flag">Flags</span></th>
224
- </tr>
225
- </thead>
226
- <tbody>
227
- <tr class="setting">
228
- <td>
229
- <p class="name"><strong>Local Server Port</strong></p>
230
- <p class="description">Listen on the given port.</p>
231
- </td>
232
- <td class="align-center">
233
- <p><code class="option">port: PORT</code></p>
234
- <p><code class="flag">--port PORT</code></p>
235
- </td>
236
- </tr>
237
- <tr class="setting">
238
- <td>
239
- <p class="name"><strong>Local Server Hostname</strong></p>
240
- <p class="description">Listen at the given hostname.</p>
241
- </td>
242
- <td class="align-center">
243
- <p><code class="option">host: HOSTNAME</code></p>
244
- <p><code class="flag">--host HOSTNAME</code></p>
245
- </td>
246
- </tr>
247
- <tr class="setting">
248
- <td>
249
- <p class="name"><strong>Base URL</strong></p>
250
- <p class="description">Serve the website from the given base URL</p>
251
- </td>
252
- <td class="align-center">
253
- <p><code class="option">baseurl: URL</code></p>
254
- <p><code class="flag">--baseurl URL</code></p>
255
- </td>
256
- </tr>
257
- <tr class="setting">
258
- <td>
259
- <p class="name"><strong>Detach</strong></p>
260
- <p class="description">Detach the server from the terminal</p>
261
- </td>
262
- <td class="align-center">
263
- <p><code class="option">detach: BOOL</code></p>
264
- <p><code class="flag">-B, --detach</code></p>
265
- </td>
266
- </tr>
267
- </tbody>
268
- </table>
269
- </div>
270
-
271
- <div class="note warning">
272
- <h5>Do not use tabs in configuration files</h5>
273
- <p>
274
- This will either lead to parsing errors, or Jekyll will revert to the
275
- default settings. Use spaces instead.
276
- </p>
277
- </div>
278
-
279
- ## Frontmatter defaults
280
-
281
- Using [YAML front-matter](../frontmatter/) is one way that you can specify configuration in the pages and posts for your site. Setting things like a default layout, or customizing the title, or specifying a more precise date/time for the post can all be added to your page or post front-matter.
282
-
283
- Often times, you will find that you are repeating a lot of configuration options. Setting the same layout in each file, adding the same category - or categories - to a post, etc. You can even add custom variables like author names, which might be the same for the majority of posts on your blog.
284
-
285
- Instead of repeating this configuration each time you create a new post or page, Jekyll provides a way to set these defaults in the site configuration. To do this, you can specify site-wide defaults using the `defaults` key in the `_config.yml` file in your projects root directory.
286
-
287
- The `defaults` key holds an array of scope/values pairs that define what defaults should be set for a particular file path, and optionally, a file type in that path.
288
-
289
- Let's say that you want to add a default layout to all pages and posts in your site. You would add this to your `_config.yml` file:
290
-
291
- {% highlight yaml %}
292
- defaults:
293
- -
294
- scope:
295
- path: "" # an empty string here means all files in the project
296
- values:
297
- layout: "default"
298
- {% endhighlight %}
299
-
300
- Here, we are scoping the `values` to any file that exists in the scopes path. Since the path is set as an empty string, it will apply to **all files** in your project. You probably don't want to set a layout on every file in your project - like css files, for example - so you can also specify a `type` value under the `scope` key.
301
-
302
- {% highlight yaml %}
303
- defaults:
304
- -
305
- scope:
306
- path: "" # an empty string here means all files in the project
307
- type: "post"
308
- values:
309
- layout: "default"
310
- {% endhighlight %}
311
-
312
- Now, this will only set the layout for files where the type is `post`.
313
- The different types that are available to you are `page`, `post`, `draft` or any collection in your site. While `type` is optional, you must specify a value for `path` when creating a `scope/values` pair.
314
-
315
- As mentioned earlier, you can set multiple scope/values pairs for `defaults`.
316
-
317
- {% highlight yaml %}
318
- defaults:
319
- -
320
- scope:
321
- path: ""
322
- type: "post"
323
- values:
324
- layout: "my-site"
325
- -
326
- scope:
327
- path: "projects"
328
- type: "page"
329
- values:
330
- layout: "project" # overrides previous default layout
331
- author: "Mr. Hyde"
332
- category: "project"
333
- {% endhighlight %}
334
-
335
- With these defaults, all posts would use the `my-site` layout. Any html files that exist in the `projects/` folder will use the `project` layout, if it exists. Those files will also have the `page.author` [liquid variable](../variables/) set to `Mr. Hyde` as well as have the category for the page set to `project`.
336
-
337
- {% highlight yaml %}
338
- collections:
339
- - my_collection:
340
- output: true
341
-
342
- defaults:
343
- -
344
- scope:
345
- path: ""
346
- type: "my_collection" # a collection in your site
347
- values:
348
- layout: "default"
349
- {% endhighlight %}
350
-
351
- In this example the `layout` is set to `default` inside the [collection](../collections) with the name `my_collection`.
352
-
353
- ### Precedence
354
-
355
- Jekyll will apply all of the configuration settings you specify in the `defaults` section of your `_config.yml` file. However, you can choose to override settings from other scope/values pair by specifying a more specific path for the scope.
356
-
357
- You can see that in the last example above. First, we set the default layout to `my-site`. Then, using a more specific path, we set the default layout for files in the `projects/` path to `project`. This can be done with any value that you would set in the page or post front-matter.
358
-
359
- Finally, if you set defaults in the site configuration by adding a `defaults` section to your `_config.yml` file, you can override those settings in a post or page file. All you need to do is specify the settings in the post or page front-matter. For example:
360
-
361
- {% highlight yaml %}
362
- # In _config.yml
363
- ...
364
- defaults:
365
- -
366
- scope:
367
- path: "projects"
368
- type: "page"
369
- values:
370
- layout: "project"
371
- author: "Mr. Hyde"
372
- category: "project"
373
- ...
374
- {% endhighlight %}
375
-
376
- {% highlight yaml %}
377
- # In projects/foo_project.md
378
- ---
379
- author: "John Smith"
380
- layout: "foobar"
381
- ---
382
- The post text goes here...
383
- {% endhighlight %}
384
-
385
- The `projects/foo_project.md` would have the `layout` set to `foobar` instead of `project` and the `author` set to `John Smith` instead of `Mr. Hyde` when the site is built.
386
-
387
- ## Default Configuration
388
-
389
- Jekyll runs with the following configuration options by default. Unless
390
- alternative settings for these options are explicitly specified in the
391
- configuration file or on the command-line, Jekyll will run using these options.
392
-
393
- <div class="note warning">
394
- <h5>There are two unsupported kramdown options</h5>
395
- <p>
396
- Please note that both <code>remove_block_html_tags</code> and
397
- <code>remove_span_html_tags</code> are currently unsupported in Jekyll due to the
398
- fact that they are not included within the kramdown HTML converter.
399
- </p>
400
- </div>
401
-
402
- {% highlight yaml %}
403
- source: .
404
- destination: ./_site
405
- plugins: ./_plugins
406
- layouts: ./_layouts
407
- include: ['.htaccess']
408
- exclude: []
409
- keep_files: ['.git','.svn']
410
- gems: []
411
- timezone: nil
412
- encoding: nil
413
-
414
- future: true
415
- show_drafts: false
416
- limit_posts: 0
417
- highlighter: pygments
418
-
419
- relative_permalinks: true
420
-
421
- permalink: date
422
- paginate_path: 'page:num'
423
- paginate: nil
424
-
425
- markdown: kramdown
426
- markdown_ext: markdown,mkdown,mkdn,mkd,md
427
- textile_ext: textile
428
-
429
- excerpt_separator: "\n\n"
430
-
431
- safe: false
432
- watch: false # deprecated
433
- server: false # deprecated
434
- host: 0.0.0.0
435
- port: 4000
436
- baseurl: ""
437
- lsi: false
438
-
439
- maruku:
440
- use_tex: false
441
- use_divs: false
442
- png_engine: blahtex
443
- png_dir: images/latex
444
- png_url: /images/latex
445
- fenced_code_blocks: true
446
-
447
- rdiscount:
448
- extensions: []
449
-
450
- redcarpet:
451
- extensions: []
452
-
453
- kramdown:
454
- auto_ids: true
455
- footnote_nr: 1
456
- entity_output: as_char
457
- toc_levels: 1..6
458
- smart_quotes: lsquo,rsquo,ldquo,rdquo
459
- use_coderay: false
460
-
461
- coderay:
462
- coderay_wrap: div
463
- coderay_line_numbers: inline
464
- coderay_line_numbers_start: 1
465
- coderay_tab_width: 4
466
- coderay_bold_every: 10
467
- coderay_css: style
468
-
469
- redcloth:
470
- hard_breaks: true
471
- {% endhighlight %}
472
-
473
- ## Markdown Options
474
-
475
- The various Markdown renderers supported by Jekyll sometimes have extra options available.
476
-
477
- ### Redcarpet
478
-
479
- Redcarpet can be configured by providing an `extensions` sub-setting, whose value should be an array of strings. Each string should be the name of one of the `Redcarpet::Markdown` class's extensions; if present in the array, it will set the corresponding extension to `true`.
480
-
481
- Jekyll handles two special Redcarpet extensions:
482
-
483
- - `no_fenced_code_blocks` --- By default, Jekyll sets the `fenced_code_blocks` extension (for delimiting code blocks with triple tildes or triple backticks) to `true`, probably because GitHub's eager adoption of them is starting to make them inescapable. Redcarpet's normal `fenced_code_blocks` extension is inert when used with Jekyll; instead, you can use this inverted version of the extension for disabling fenced code.
484
-
485
- Note that you can also specify a language for highlighting after the first delimiter:
486
-
487
- ```ruby
488
- # ...ruby code
489
- ```
490
-
491
- With both fenced code blocks and highlighter enabled, this will statically highlight the code; without any syntax highlighter, it will add a `class="LANGUAGE"` attribute to the `<code>` element, which can be used as a hint by various JavaScript code highlighting libraries.
492
- - `smart` --- This pseudo-extension turns on SmartyPants, which converts straight quotes to curly quotes and runs of hyphens to em (`---`) and en (`--`) dashes.
493
-
494
- All other extensions retain their usual names from Redcarpet, and no renderer options aside from `smart` can be specified in Jekyll. [A list of available extensions can be found in the Redcarpet README file.][redcarpet_extensions] Make sure you're looking at the README for the right version of Redcarpet: Jekyll currently uses v2.2.x, and extensions like `footnotes` and `highlight` weren't added until after version 3.0.0. The most commonly used extensions are:
495
-
496
- - `tables`
497
- - `no_intra_emphasis`
498
- - `autolink`
499
-
500
- [redcarpet_extensions]: https://github.com/vmg/redcarpet/blob/v2.2.2/README.markdown#and-its-like-really-simple-to-use
501
-
502
- ### Kramdown
503
-
504
- In addition to the defaults mentioned above, you can also turn on recognition of Github Flavored Markdown by passing an `input` option with a value of "GFM".
505
-
506
- For example, in your `_config.yml`:
507
-
508
- kramdown:
509
- input: GFM
510
-
511
- ### Custom Markdown Processors
512
-
513
- If you're interested in creating a custom markdown processor, you're in luck! Create a new class in the `Jekyll::Converters::Markdown` namespace:
514
-
515
- {% highlight ruby %}
516
- class Jekyll::Converters::Markdown::MyCustomProcessor
517
- def initialize(config)
518
- require 'funky_markdown'
519
- @config = config
520
- rescue LoadError
521
- STDERR.puts 'You are missing a library required for Markdown. Please run:'
522
- STDERR.puts ' $ [sudo] gem install funky_markdown'
523
- raise FatalException.new("Missing dependency: funky_markdown")
524
- end
525
-
526
- def convert(content)
527
- ::FunkyMarkdown.new(content).convert
528
- end
529
- end
530
- {% endhighlight %}
531
-
532
- Once you've created your class and have it properly setup either as a plugin in the `_plugins` folder or as a gem, specify it in your `_config.yml`:
533
-
534
- {% highlight yaml %}
535
- markdown: MyCustomProcessor
536
- {% endhighlight %}