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