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,76 +0,0 @@
1
- /*****************************************************************************/
2
- /*
3
- /* Common
4
- /*
5
- /*****************************************************************************/
6
-
7
- /* Global Reset */
8
-
9
- * {
10
- margin: 0;
11
- padding: 0;
12
- }
13
-
14
- html, body {
15
- height: 100%;
16
- }
17
-
18
- body {
19
- background-color: white;
20
- font: 13.34px helvetica, arial, clean, sans-serif;
21
- *font-size: small;
22
- text-align: center;
23
- }
24
-
25
- h1, h2, h3, h4, h5, h6 {
26
- font-size: 100%;
27
- }
28
-
29
- h1 {
30
- margin-bottom: 1em;
31
- }
32
-
33
- p {
34
- margin: 1em 0;
35
- }
36
-
37
- a {
38
- color: #00a;
39
- }
40
-
41
- a:hover {
42
- color: black;
43
- }
44
-
45
- a:visited {
46
- color: #a0a;
47
- }
48
-
49
- table {
50
- font-size: inherit;
51
- font: 100%;
52
- }
53
-
54
- /*****************************************************************************/
55
- /*
56
- /* Site
57
- /*
58
- /*****************************************************************************/
59
-
60
- .site {
61
- font-size: 110%;
62
- text-align: justify;
63
- width: 40em;
64
- margin: 3em auto 2em auto;
65
- line-height: 1.5em;
66
- }
67
-
68
- .title {
69
- color: #a00;
70
- font-weight: bold;
71
- margin-bottom: 2em;
72
- }
73
-
74
- .site .meta {
75
- color: #aaa;
76
- }
@@ -1,7 +0,0 @@
1
- ---
2
- title: Deal with dots
3
- permalink: /deal.with.dots/
4
- ---
5
-
6
- Let's test if jekyll deals properly with dots.
7
-
@@ -1,5 +0,0 @@
1
- ---
2
- title: I'm a Jekyll environment exchequer
3
- ---
4
-
5
- {{ jekyll.environment }}
@@ -1,5 +0,0 @@
1
- ---
2
- permalink: /%2e%2e/%2e%2e/%2e%2e/baddie.html
3
- ---
4
-
5
- # Test
@@ -1,8 +0,0 @@
1
- ---
2
- layout: default
3
- title: Topical Post
4
- ---
5
-
6
- h1. {{ page.title }}
7
-
8
- This post has a topic.
@@ -1,22 +0,0 @@
1
- ---
2
- layout: default
3
- title: Tom Preston-Werner
4
- ---
5
-
6
- h1. Welcome to my site
7
-
8
- h2. Please read our {{ site.posts | size }} Posts
9
-
10
- <ul>
11
- {% for post in site.posts %}
12
- <li>{{ post.date }} <a href="{{ post.url }}">{{ post.title }}</a></li>
13
- {% endfor %}
14
- </ul>
15
-
16
- {% assign first_post = site.posts.first %}
17
- <div id="first_post">
18
- <h1>{{ first_post.title }}</h1>
19
- <div>
20
- {{ first_post.content }}
21
- </div>
22
- </div>
@@ -1,10 +0,0 @@
1
- ---
2
- ---
3
-
4
- $ ->
5
- list = [1, 2, 3, 4, 5]
6
- square = (x) -> x * x
7
- cube = (x) -> square(x) * x
8
- cubes = (math.cube num for num in list)
9
-
10
- alert "I knew it!" if elvis?
@@ -1,2 +0,0 @@
1
- -----BEGIN PGP PUBLIC KEY BLOCK-----
2
- Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
@@ -1,4 +0,0 @@
1
- - name: sugar
2
- price: 5.3
3
- - name: salt
4
- price: 2.5
@@ -1,8 +0,0 @@
1
- ---
2
- foo: bar
3
- layout: default
4
- permalink: /properties/
5
- title: Properties Page
6
- ---
7
-
8
- All the properties.
@@ -1,32 +0,0 @@
1
- ---
2
- layout: nil
3
- ---
4
- <?xml version="1.0" encoding="UTF-8"?>
5
- <urlset
6
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
7
-
8
- <url>
9
- <loc>http://example.com</loc>
10
- <lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
11
- <changefreq>daily</changefreq>
12
- <priority>1.0</priority>
13
- </url>
14
-
15
- {% for post in site.posts %}
16
- <url>
17
- <loc>http://example.com{{ post.url }}/</loc>
18
- <lastmod>{{ post.date | date: "%Y-%m-%d" }}</lastmod>
19
- <changefreq>monthly</changefreq>
20
- <priority>0.2</priority>
21
- </url>
22
- {% endfor %}
23
-
24
- {% for page in site.html_pages %}
25
- <url>
26
- <loc>http://example.com{{ page.url }}</loc>
27
- <lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
28
- {% if page.changefreq %}<changefreq>{{ page.changefreq }}</changefreq>{% endif %}
29
- {% if page.priority %}<priority>{{ page.priority }}</priority>{% endif %}
30
- </url>
31
- {% endfor %}
32
- </urlset>
@@ -1,4 +0,0 @@
1
- ---
2
- ---
3
- {% for file in site.static_files %}
4
- - {{ file.path }} last edited at {{ file.modified_time }} with extname {{ file.extname }}{% endfor %}
@@ -1,22 +0,0 @@
1
- ---
2
- layout: default
3
- title: Tom Preston-Werner
4
- ---
5
-
6
- h1. Welcome to my site
7
-
8
- h2. Please read our {{ site.posts | size }} Posts
9
-
10
- <ul>
11
- {% for post in site.posts %}
12
- <li>{{ post.date }} <a href="{{ post.url }}">{{ post.title }}</a></li>
13
- {% endfor %}
14
- </ul>
15
-
16
- {% assign first_post = site.posts.first %}
17
- <div id="first_post">
18
- <h1>{{ first_post.title }}</h1>
19
- <div>
20
- {{ first_post.content }}
21
- </div>
22
- </div>
@@ -1,7 +0,0 @@
1
- ---
2
- layout: default
3
- title: Not published!
4
- published: false
5
- ---
6
-
7
- This should *not* be published!
@@ -1,7 +0,0 @@
1
- ---
2
- layout: post
3
- title: "Test title"
4
- tag: "Ruby"
5
- ---
6
-
7
- This is the content
@@ -1,6 +0,0 @@
1
- ---
2
- layout: default
3
- title: Categories
4
- ---
5
-
6
- Categories _should_ work. Even if ordered after index.
@@ -1,11 +0,0 @@
1
- require 'rubygems'
2
- gem 'test-unit'
3
- require 'test/unit'
4
-
5
- # for some reason these tests fail when run via TextMate
6
- # but succeed when run on the command line.
7
-
8
- tests = Dir[File.expand_path("#{File.dirname(__FILE__)}/test_*.rb")]
9
- tests.each do |file|
10
- require file
11
- end
@@ -1,77 +0,0 @@
1
- require 'helper'
2
-
3
- class TestCleaner < Test::Unit::TestCase
4
- context "directory in keep_files" do
5
- setup do
6
- clear_dest
7
- stub(Jekyll).configuration do
8
- Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
9
- end
10
-
11
- FileUtils.mkdir_p(dest_dir('to_keep/child_dir'))
12
- FileUtils.touch(File.join(dest_dir('to_keep'), 'index.html'))
13
- FileUtils.touch(File.join(dest_dir('to_keep/child_dir'), 'index.html'))
14
-
15
- @site = Site.new(Jekyll.configuration)
16
- @site.keep_files = ['to_keep/child_dir']
17
-
18
- @cleaner = Site::Cleaner.new(@site)
19
- @cleaner.cleanup!
20
- end
21
-
22
- teardown do
23
- FileUtils.rm_rf(dest_dir('to_keep'))
24
- end
25
-
26
- should "keep the parent directory" do
27
- assert File.exist?(dest_dir('to_keep'))
28
- end
29
-
30
- should "keep the child directory" do
31
- assert File.exist?(dest_dir('to_keep/child_dir'))
32
- end
33
-
34
- should "keep the file in the directory in keep_files" do
35
- assert File.exist?(File.join(dest_dir('to_keep/child_dir'), 'index.html'))
36
- end
37
-
38
- should "delete the file in the directory not in keep_files" do
39
- assert !File.exist?(File.join(dest_dir('to_keep'), 'index.html'))
40
- end
41
- end
42
-
43
- context "directory containing no files and non-empty directories" do
44
- setup do
45
- clear_dest
46
- stub(Jekyll).configuration do
47
- Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
48
- end
49
-
50
- FileUtils.mkdir_p(source_dir('no_files_inside/child_dir'))
51
- FileUtils.touch(File.join(source_dir('no_files_inside/child_dir'), 'index.html'))
52
-
53
- @site = Site.new(Jekyll.configuration)
54
- @site.process
55
-
56
- @cleaner = Site::Cleaner.new(@site)
57
- @cleaner.cleanup!
58
- end
59
-
60
- teardown do
61
- FileUtils.rm_rf(source_dir('no_files_inside'))
62
- FileUtils.rm_rf(dest_dir('no_files_inside'))
63
- end
64
-
65
- should "keep the parent directory" do
66
- assert File.exist?(dest_dir('no_files_inside'))
67
- end
68
-
69
- should "keep the child directory" do
70
- assert File.exist?(dest_dir('no_files_inside/child_dir'))
71
- end
72
-
73
- should "keep the file" do
74
- assert File.exist?(File.join(dest_dir('no_files_inside/child_dir'), 'index.html'))
75
- end
76
- end
77
- end
@@ -1,49 +0,0 @@
1
- require 'helper'
2
-
3
- class TestCoffeeScript < Test::Unit::TestCase
4
- context "converting CoffeeScript" do
5
- setup do
6
- @site = Jekyll::Site.new(Jekyll.configuration({
7
- "source" => source_dir,
8
- "destination" => dest_dir
9
- }))
10
- @site.process
11
- @test_coffeescript_file = dest_dir("js/coffeescript.js")
12
- @js_output = <<-JS
13
- (function() {
14
- $(function() {
15
- var cube, cubes, list, num, square;
16
- list = [1, 2, 3, 4, 5];
17
- square = function(x) {
18
- return x * x;
19
- };
20
- cube = function(x) {
21
- return square(x) * x;
22
- };
23
- cubes = (function() {
24
- var _i, _len, _results;
25
- _results = [];
26
- for (_i = 0, _len = list.length; _i < _len; _i++) {
27
- num = list[_i];
28
- _results.push(math.cube(num));
29
- }
30
- return _results;
31
- })();
32
- if (typeof elvis !== \"undefined\" && elvis !== null) {
33
- return alert(\"I knew it!\");
34
- }
35
- });
36
-
37
- }).call(this);
38
- JS
39
- end
40
-
41
- should "write a JS file in place" do
42
- assert File.exist?(@test_coffeescript_file), "Can't find the converted CoffeeScript file in the dest_dir."
43
- end
44
-
45
- should "produce JS" do
46
- assert_equal @js_output, File.read(@test_coffeescript_file)
47
- end
48
- end
49
- end
@@ -1,224 +0,0 @@
1
- require 'helper'
2
-
3
- class TestCollections < Test::Unit::TestCase
4
-
5
- def fixture_site(overrides = {})
6
- Jekyll::Site.new(Jekyll.configuration(
7
- overrides.merge({
8
- "source" => source_dir,
9
- "destination" => dest_dir
10
- })
11
- ))
12
- end
13
-
14
- context "an evil collection" do
15
- setup do
16
- @collection = Jekyll::Collection.new(fixture_site, "../../etc/password")
17
- end
18
-
19
- should "sanitize the label name" do
20
- assert_equal @collection.label, "....etcpassword"
21
- end
22
-
23
- should "have a sanitized relative path name" do
24
- assert_equal @collection.relative_directory, "_....etcpassword"
25
- end
26
-
27
- should "have a sanitized full path" do
28
- assert_equal @collection.directory, source_dir("_....etcpassword")
29
- end
30
- end
31
-
32
- context "a simple collection" do
33
- setup do
34
- @collection = Jekyll::Collection.new(fixture_site, "methods")
35
- end
36
-
37
- should "sanitize the label name" do
38
- assert_equal @collection.label, "methods"
39
- end
40
-
41
- should "have default url template" do
42
- assert_equal @collection.url_template, "/:collection/:path:output_ext"
43
- end
44
-
45
- should "contain no docs when initialized" do
46
- assert_empty @collection.docs
47
- end
48
-
49
- should "know its relative directory" do
50
- assert_equal @collection.relative_directory, "_methods"
51
- end
52
-
53
- should "know the full path to itself on the filesystem" do
54
- assert_equal @collection.directory, source_dir("_methods")
55
- end
56
-
57
- context "when turned into Liquid" do
58
- should "have a label attribute" do
59
- assert_equal @collection.to_liquid["label"], "methods"
60
- end
61
-
62
- should "have a docs attribute" do
63
- assert_equal @collection.to_liquid["docs"], Array.new
64
- end
65
-
66
- should "have a directory attribute" do
67
- assert_equal @collection.to_liquid["directory"], source_dir("_methods")
68
- end
69
-
70
- should "have a relative_directory attribute" do
71
- assert_equal @collection.to_liquid["relative_directory"], "_methods"
72
- end
73
-
74
- should "have a output attribute" do
75
- assert_equal @collection.to_liquid["output"], false
76
- end
77
- end
78
-
79
- should "know whether it should be written or not" do
80
- assert_equal @collection.write?, false
81
- @collection.metadata['output'] = true
82
- assert_equal @collection.write?, true
83
- @collection.metadata.delete 'output'
84
- end
85
- end
86
-
87
- context "with no collections specified" do
88
- setup do
89
- @site = fixture_site
90
- @site.process
91
- end
92
-
93
- should "not contain any collections" do
94
- assert_equal Hash.new, @site.collections
95
- end
96
- end
97
-
98
- context "a collection with permalink" do
99
- setup do
100
- @site = fixture_site({
101
- "collections" => {
102
- "methods" => {
103
- "permalink" => "/awesome/:path/"
104
- }
105
- }
106
- })
107
- @site.process
108
- @collection = @site.collections["methods"]
109
- end
110
-
111
- should "have custom url template" do
112
- assert_equal @collection.url_template, "/awesome/:path/"
113
- end
114
- end
115
-
116
- context "with a collection" do
117
- setup do
118
- @site = fixture_site({
119
- "collections" => ["methods"]
120
- })
121
- @site.process
122
- @collection = @site.collections["methods"]
123
- end
124
-
125
- should "create a Hash on Site with the label mapped to the instance of the Collection" do
126
- assert @site.collections.is_a?(Hash)
127
- assert_not_nil @site.collections["methods"]
128
- assert @site.collections["methods"].is_a? Jekyll::Collection
129
- end
130
-
131
- should "collects docs in an array on the Collection object" do
132
- assert @site.collections["methods"].docs.is_a? Array
133
- @site.collections["methods"].docs.each do |doc|
134
- assert doc.is_a? Jekyll::Document
135
- assert_include %w[
136
- _methods/configuration.md
137
- _methods/sanitized_path.md
138
- _methods/site/generate.md
139
- _methods/site/initialize.md
140
- _methods/um_hi.md
141
- ], doc.relative_path
142
- end
143
- end
144
-
145
- should "not include files which start with an underscore in the base collection directory" do
146
- assert_not_include @collection.filtered_entries, "_do_not_read_me.md"
147
- end
148
-
149
- should "not include files which start with an underscore in a subdirectory" do
150
- assert_not_include @collection.filtered_entries, "site/_dont_include_me_either.md"
151
- end
152
-
153
- should "not include the underscored files in the list of docs" do
154
- assert_not_include @collection.docs.map(&:relative_path), "_methods/_do_not_read_me.md"
155
- assert_not_include @collection.docs.map(&:relative_path), "_methods/site/_dont_include_me_either.md"
156
- end
157
- end
158
-
159
- context "with a collection with metadata" do
160
- setup do
161
- @site = fixture_site({
162
- "collections" => {
163
- "methods" => {
164
- "foo" => "bar",
165
- "baz" => "whoo"
166
- }
167
- }
168
- })
169
- @site.process
170
- @collection = @site.collections["methods"]
171
- end
172
-
173
- should "extract the configuration collection information as metadata" do
174
- assert_equal @collection.metadata, {"foo" => "bar", "baz" => "whoo"}
175
- end
176
- end
177
-
178
- context "in safe mode" do
179
- setup do
180
- @site = fixture_site({
181
- "collections" => ["methods"],
182
- "safe" => true
183
- })
184
- @site.process
185
- @collection = @site.collections["methods"]
186
- end
187
-
188
- should "not allow symlinks" do
189
- assert_not_include @collection.filtered_entries, "um_hi.md"
190
- end
191
-
192
- should "not include the symlinked file in the list of docs" do
193
- assert_not_include @collection.docs.map(&:relative_path), "_methods/um_hi.md"
194
- end
195
- end
196
-
197
- context "with dots in the filenames" do
198
- setup do
199
- @site = fixture_site({
200
- "collections" => ["with.dots"],
201
- "safe" => true
202
- })
203
- @site.process
204
- @collection = @site.collections["with.dots"]
205
- end
206
-
207
- should "exist" do
208
- assert_not_nil @collection
209
- end
210
-
211
- should "contain one document" do
212
- assert_equal 2, @collection.docs.size
213
- end
214
-
215
- should "allow dots in the filename" do
216
- assert_equal "_with.dots", @collection.relative_directory
217
- end
218
-
219
- should "read document in subfolders with dots" do
220
- assert @collection.docs.any? { |d| d.path.include?("all.dots") }
221
- end
222
- end
223
-
224
- end