octopress-ink 1.0.0.rc.11 → 1.0.0.rc.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +12 -3
  5. data/assets/docs/creating-a-plugin.markdown +85 -23
  6. data/assets/docs/plugin-reference.markdown +1 -1
  7. data/assets/docs/working-with-plugins.markdown +188 -0
  8. data/lib/octopress-ink.rb +40 -93
  9. data/lib/octopress-ink/assets/asset.rb +8 -10
  10. data/lib/octopress-ink/assets/doc_page.rb +3 -6
  11. data/lib/octopress-ink/assets/file.rb +2 -2
  12. data/lib/octopress-ink/assets/layout.rb +1 -1
  13. data/lib/octopress-ink/assets/page.rb +17 -4
  14. data/lib/octopress-ink/assets/sass.rb +1 -1
  15. data/lib/octopress-ink/commands/helpers.rb +1 -1
  16. data/lib/octopress-ink/commands/list.rb +1 -1
  17. data/lib/octopress-ink/commands/new.rb +1 -4
  18. data/lib/octopress-ink/configuration.rb +10 -27
  19. data/lib/octopress-ink/jekyll/hooks.rb +23 -149
  20. data/lib/octopress-ink/jekyll/page.rb +12 -0
  21. data/lib/octopress-ink/plugin.rb +1 -1
  22. data/lib/octopress-ink/plugin_asset_pipeline.rb +4 -5
  23. data/lib/octopress-ink/plugins.rb +5 -5
  24. data/lib/octopress-ink/tags.rb +0 -11
  25. data/lib/octopress-ink/version.rb +1 -1
  26. data/octopress-ink.gemspec +7 -5
  27. data/test/.clash.yml +46 -0
  28. data/test/Gemfile +1 -3
  29. data/test/_config.yml +7 -6
  30. data/test/{combine_css_false/stylesheets → _expected/combine_css_false}/awesome-sauce/plugin-media-test.css +0 -0
  31. data/test/{combine_css_false/stylesheets → _expected/combine_css_false}/awesome-sauce/plugin-test.css +0 -0
  32. data/test/_expected/combine_css_false/theme/main.css +2 -0
  33. data/test/{combine_css_false/stylesheets → _expected/combine_css_false}/theme/theme-media-test.css +0 -0
  34. data/test/{combine_css_false/stylesheets → _expected/combine_css_false}/theme/theme-test.css +0 -0
  35. data/test/{combine_css_false/stylesheets → _expected/combine_css_false}/theme/theme-test2.css +0 -0
  36. data/test/{combine_js_false/javascripts → _expected/combine_js_false}/theme/bar.js +0 -0
  37. data/test/{combine_js_false/javascripts → _expected/combine_js_false}/theme/blah.js +0 -0
  38. data/test/{combine_js_false/javascripts → _expected/combine_js_false}/theme/foo.js +0 -0
  39. data/test/{compress_false → _expected/compress_false}/javascripts/all-.js +0 -0
  40. data/test/{compress_false → _expected/compress_false}/stylesheets/all-.css +1 -1
  41. data/test/{compress_false → _expected/compress_false}/stylesheets/print-.css +0 -0
  42. data/test/{copy_layouts_pages/_copy → _expected/copy_layouts_pages}/layouts/default.html +0 -0
  43. data/test/{copy_layouts_pages/_copy → _expected/copy_layouts_pages}/layouts/test.html +0 -0
  44. data/test/{copy_layouts_pages/_copy → _expected/copy_layouts_pages}/pages/disable-test.html +0 -0
  45. data/test/{copy_layouts_pages/_copy → _expected/copy_layouts_pages}/pages/four.xml +0 -0
  46. data/test/{copy_layouts_pages/_copy → _expected/copy_layouts_pages}/pages/one.xml +0 -0
  47. data/test/{copy_layouts_pages/_copy → _expected/copy_layouts_pages}/pages/three.md +1 -1
  48. data/test/{copy_layouts_pages/_copy → _expected/copy_layouts_pages}/pages/two.md +0 -0
  49. data/test/{plugins/test-theme → _expected/copy_test}/config.yml +3 -0
  50. data/test/{copy_test/_copy → _expected/copy_test}/files/disabled-file.txt +0 -0
  51. data/test/{copy_test/_copy → _expected/copy_test}/files/favicon.ico +0 -0
  52. data/test/{copy_test/_copy → _expected/copy_test}/files/favicon.png +0 -0
  53. data/test/{copy_test/_copy → _expected/copy_test}/files/test.html +0 -0
  54. data/test/{copy_test/_copy → _expected/copy_test}/fonts/font-one.otf +0 -0
  55. data/test/{copy_test/_copy → _expected/copy_test}/fonts/font-two.ttf +0 -0
  56. data/test/{copy_test/_copy → _expected/copy_test}/includes/bar.html +0 -0
  57. data/test/{copy_test/_copy → _expected/copy_test}/includes/greet.html +0 -0
  58. data/test/{copy_test/_copy → _expected/copy_test}/javascripts/bar.js +0 -0
  59. data/test/{copy_test/_copy → _expected/copy_test}/javascripts/blah.coffee +0 -0
  60. data/test/{copy_test/_copy → _expected/copy_test}/javascripts/disable-this.js +0 -0
  61. data/test/{copy_test/_copy → _expected/copy_test}/javascripts/foo.js +0 -0
  62. data/test/{copy_test/_copy → _expected/copy_test}/layouts/default.html +0 -0
  63. data/test/{copy_test/_copy → _expected/copy_test}/layouts/test.html +0 -0
  64. data/test/{copy_test/_copy → _expected/copy_test}/pages/disable-test.html +0 -0
  65. data/test/{copy_test/_copy → _expected/copy_test}/pages/four.xml +0 -0
  66. data/test/{copy_test/_copy → _expected/copy_test}/pages/one.xml +0 -0
  67. data/test/{copy_test/_copy → _expected/copy_test}/pages/three.md +1 -1
  68. data/test/{copy_test/_copy → _expected/copy_test}/pages/two.md +0 -0
  69. data/test/{copy_test/_copy → _expected/copy_test}/stylesheets/_colors.scss +0 -0
  70. data/test/_expected/copy_test/stylesheets/disable-this.css +1 -0
  71. data/test/{copy_test/_copy → _expected/copy_test}/stylesheets/disable.sass +0 -0
  72. data/test/_expected/copy_test/stylesheets/main.scss +5 -0
  73. data/test/{copy_test/_copy → _expected/copy_test}/stylesheets/theme-media-test@print.css +0 -0
  74. data/test/{copy_test/_copy → _expected/copy_test}/stylesheets/theme-test.css +0 -0
  75. data/test/{copy_test/_copy → _expected/copy_test}/stylesheets/theme-test2.css +0 -0
  76. data/test/{expected → _expected/site}/2014/02/01/test-post.html +0 -0
  77. data/test/{expected → _expected/site}/2014/02/02/test-post-2.html +0 -0
  78. data/test/{expected → _expected/site}/favicon.ico +0 -0
  79. data/test/{expected → _expected/site}/favicon.png +0 -0
  80. data/test/{expected → _expected/site}/four/index.xml +0 -0
  81. data/test/_expected/site/index.html +15 -0
  82. data/test/{expected → _expected/site}/javascripts/all-.js +0 -0
  83. data/test/{expected → _expected/site}/robots.txt +0 -0
  84. data/test/_expected/site/stylesheets/all-.css +1 -0
  85. data/test/{expected → _expected/site}/stylesheets/print-.css +0 -0
  86. data/test/{expected → _expected/site}/test.html +0 -0
  87. data/test/{expected → _expected/site}/test_config/plugin_config.html +0 -0
  88. data/test/{expected → _expected/site}/test_config/theme_config.html +0 -0
  89. data/test/{expected → _expected/site}/test_layouts/local.html +0 -0
  90. data/test/{expected → _expected/site}/test_layouts/plugin_layout.html +0 -0
  91. data/test/{expected → _expected/site}/test_layouts/test_markdown.html +0 -0
  92. data/test/{expected → _expected/site}/test_layouts/theme.html +0 -0
  93. data/test/{expected → _expected/site}/test_layouts/theme_override.html +0 -0
  94. data/test/{expected → _expected/site}/test_pages/feed/index.xml +0 -0
  95. data/test/{expected → _expected/site}/test_pages/plugin_page.html +0 -0
  96. data/test/{expected → _expected/site}/test_pages/plugin_page_override.html +0 -0
  97. data/test/{expected → _expected/site}/test_pages/theme_page.html +0 -0
  98. data/test/_expected/site/test_pages/three.html +13 -0
  99. data/test/{test-plugin-expected → _expected/test-plugin-expected}/.gitignore +0 -0
  100. data/test/{test-plugin-expected → _expected/test-plugin-expected}/Gemfile +0 -0
  101. data/test/{test-plugin-expected → _expected/test-plugin-expected}/LICENSE.txt +0 -0
  102. data/test/{test-plugin-expected → _expected/test-plugin-expected}/README.md +0 -0
  103. data/test/{test-plugin-expected → _expected/test-plugin-expected}/Rakefile +0 -0
  104. data/test/{test-plugin-expected → _expected/test-plugin-expected}/assets/config.yml +0 -0
  105. data/test/_expected/test-plugin-expected/demo/Gemfile +3 -0
  106. data/test/{test-plugin-expected → _expected/test-plugin-expected}/demo/_config.yml +0 -0
  107. data/test/{plugins/awesome-sauce/docs → _expected/test-plugin-expected/demo}/index.html +0 -0
  108. data/test/{test-plugin-expected → _expected/test-plugin-expected}/lib/test-plugin.rb +0 -0
  109. data/test/{test-plugin-expected → _expected/test-plugin-expected}/lib/test-plugin/version.rb +0 -0
  110. data/test/{test-plugin-expected → _expected/test-plugin-expected}/test-plugin.gemspec +0 -0
  111. data/test/{test-theme-expected → _expected/test-theme-expected}/.gitignore +0 -0
  112. data/test/{test-theme-expected → _expected/test-theme-expected}/Gemfile +0 -0
  113. data/test/{test-theme-expected → _expected/test-theme-expected}/LICENSE.txt +0 -0
  114. data/test/{test-theme-expected → _expected/test-theme-expected}/README.md +0 -0
  115. data/test/{test-theme-expected → _expected/test-theme-expected}/Rakefile +0 -0
  116. data/test/{test-theme-expected → _expected/test-theme-expected}/assets/config.yml +0 -0
  117. data/test/_expected/test-theme-expected/demo/Gemfile +3 -0
  118. data/test/{test-theme-expected → _expected/test-theme-expected}/demo/_config.yml +0 -0
  119. data/test/{test-plugin-expected → _expected/test-theme-expected}/demo/index.html +0 -0
  120. data/test/{test-theme-expected → _expected/test-theme-expected}/lib/test-theme.rb +0 -0
  121. data/test/{test-theme-expected → _expected/test-theme-expected}/lib/test-theme/version.rb +0 -0
  122. data/test/{test-theme-expected → _expected/test-theme-expected}/test-theme.gemspec +0 -0
  123. data/test/{uglify_js_false/javascripts → _expected/uglify_js_false}/all-.js +0 -0
  124. data/test/{plugins → _ink_plugins}/awesome-sauce/config.yml +0 -0
  125. data/test/{test-theme-expected/demo → _ink_plugins/awesome-sauce/docs}/index.html +0 -0
  126. data/test/{plugins → _ink_plugins}/awesome-sauce/files/robots.txt +0 -0
  127. data/test/{plugins → _ink_plugins}/awesome-sauce/includes/some-include.html +0 -0
  128. data/test/{plugins → _ink_plugins}/awesome-sauce/layouts/test-layout.html +0 -0
  129. data/test/{plugins → _ink_plugins}/awesome-sauce/pages/a.html +0 -0
  130. data/test/{plugins → _ink_plugins}/awesome-sauce/pages/b.html +0 -0
  131. data/test/{plugins → _ink_plugins}/awesome-sauce/plugin.rb +0 -0
  132. data/test/{plugins → _ink_plugins}/awesome-sauce/stylesheets/plugin-media-test@print.css +0 -0
  133. data/test/{plugins → _ink_plugins}/awesome-sauce/stylesheets/plugin-test.css +0 -0
  134. data/test/{copy_test/_copy → _ink_plugins/test-theme}/config.yml +3 -0
  135. data/test/{plugins → _ink_plugins}/test-theme/files/disabled-file.txt +0 -0
  136. data/test/{plugins → _ink_plugins}/test-theme/files/favicon.ico +0 -0
  137. data/test/{plugins → _ink_plugins}/test-theme/files/favicon.png +0 -0
  138. data/test/{plugins → _ink_plugins}/test-theme/files/test.html +0 -0
  139. data/test/{plugins → _ink_plugins}/test-theme/fonts/font-one.otf +0 -0
  140. data/test/{plugins → _ink_plugins}/test-theme/fonts/font-two.ttf +0 -0
  141. data/test/{plugins → _ink_plugins}/test-theme/includes/bar.html +0 -0
  142. data/test/{plugins → _ink_plugins}/test-theme/includes/greet.html +0 -0
  143. data/test/{plugins → _ink_plugins}/test-theme/javascripts/bar.js +0 -0
  144. data/test/{plugins → _ink_plugins}/test-theme/javascripts/blah.coffee +0 -0
  145. data/test/{plugins → _ink_plugins}/test-theme/javascripts/disable-this.js +0 -0
  146. data/test/{plugins → _ink_plugins}/test-theme/javascripts/foo.js +0 -0
  147. data/test/{plugins → _ink_plugins}/test-theme/layouts/default.html +0 -0
  148. data/test/{plugins → _ink_plugins}/test-theme/layouts/test.html +0 -0
  149. data/test/{plugins → _ink_plugins}/test-theme/pages/disable-test.html +0 -0
  150. data/test/{plugins → _ink_plugins}/test-theme/pages/four.xml +0 -0
  151. data/test/{plugins → _ink_plugins}/test-theme/pages/one.xml +0 -0
  152. data/test/{plugins → _ink_plugins}/test-theme/pages/three.md +1 -1
  153. data/test/{plugins → _ink_plugins}/test-theme/pages/two.md +0 -0
  154. data/test/{plugins → _ink_plugins}/test-theme/plugin.rb +0 -0
  155. data/test/{plugins → _ink_plugins}/test-theme/stylesheets/_colors.scss +0 -0
  156. data/test/_ink_plugins/test-theme/stylesheets/disable-this.css +1 -0
  157. data/test/{plugins → _ink_plugins}/test-theme/stylesheets/disable.sass +0 -0
  158. data/test/_ink_plugins/test-theme/stylesheets/main.scss +5 -0
  159. data/test/{plugins → _ink_plugins}/test-theme/stylesheets/theme-media-test@print.css +0 -0
  160. data/test/{plugins → _ink_plugins}/test-theme/stylesheets/theme-test.css +0 -0
  161. data/test/{plugins → _ink_plugins}/test-theme/stylesheets/theme-test2.css +0 -0
  162. data/test/_templates/page +4 -0
  163. data/test/_templates/post +5 -0
  164. data/test/source/_layouts/local.html +2 -0
  165. data/test/source/_plugins/loader.rb +2 -2
  166. data/test/source/_plugins/theme/stylesheets/_colors.sass +1 -1
  167. data/test/source/index.html +3 -15
  168. metadata +309 -351
  169. data/lib/octopress-ink/filters.rb +0 -111
  170. data/lib/octopress-ink/generators/plugin_assets.rb +0 -13
  171. data/lib/octopress-ink/helpers.rb +0 -10
  172. data/lib/octopress-ink/helpers/conditional.rb +0 -24
  173. data/lib/octopress-ink/helpers/content_for.rb +0 -32
  174. data/lib/octopress-ink/helpers/path.rb +0 -74
  175. data/lib/octopress-ink/helpers/var.rb +0 -105
  176. data/lib/octopress-ink/tags/abort.rb +0 -22
  177. data/lib/octopress-ink/tags/assign.rb +0 -33
  178. data/lib/octopress-ink/tags/capture.rb +0 -38
  179. data/lib/octopress-ink/tags/content_for.rb +0 -24
  180. data/lib/octopress-ink/tags/filter.rb +0 -24
  181. data/lib/octopress-ink/tags/include.rb +0 -53
  182. data/lib/octopress-ink/tags/line_comment.rb +0 -10
  183. data/lib/octopress-ink/tags/render.rb +0 -85
  184. data/lib/octopress-ink/tags/return.rb +0 -19
  185. data/lib/octopress-ink/tags/wrap.rb +0 -81
  186. data/lib/octopress-ink/tags/yield.rb +0 -36
  187. data/lib/octopress-ink/utils.rb +0 -42
  188. data/test/combine_css_false/stylesheets/theme/main.css +0 -2
  189. data/test/copy_test/_copy/stylesheets/disable-this.css +0 -1
  190. data/test/copy_test/_copy/stylesheets/main.scss +0 -5
  191. data/test/expected/index.html +0 -71
  192. data/test/expected/stylesheets/all-.css +0 -1
  193. data/test/expected/test_pages/three.html +0 -1
  194. data/test/expected/test_tags/abort_false.html +0 -1
  195. data/test/expected/test_tags/assign.html +0 -23
  196. data/test/expected/test_tags/capture.html +0 -21
  197. data/test/expected/test_tags/content_for.html +0 -1
  198. data/test/expected/test_tags/filter.html +0 -4
  199. data/test/expected/test_tags/include.html +0 -33
  200. data/test/expected/test_tags/render.html +0 -34
  201. data/test/expected/test_tags/return.html +0 -23
  202. data/test/expected/test_tags/wrap.html +0 -29
  203. data/test/plugins/test-theme/stylesheets/disable-this.css +0 -1
  204. data/test/plugins/test-theme/stylesheets/main.scss +0 -5
  205. data/test/source/.gitignore +0 -1
  206. data/test/source/test_render/_f.html +0 -1
  207. data/test/source/test_render/_var.html +0 -1
  208. data/test/source/test_tags/_test_render.md +0 -4
  209. data/test/source/test_tags/abort_false.html +0 -5
  210. data/test/source/test_tags/abort_posts.html +0 -5
  211. data/test/source/test_tags/abort_true.html +0 -5
  212. data/test/source/test_tags/assign.html +0 -26
  213. data/test/source/test_tags/capture.html +0 -31
  214. data/test/source/test_tags/content_for.html +0 -7
  215. data/test/source/test_tags/filter.html +0 -6
  216. data/test/source/test_tags/include.html +0 -36
  217. data/test/source/test_tags/render.html +0 -36
  218. data/test/source/test_tags/return.html +0 -30
  219. data/test/source/test_tags/wrap.html +0 -32
  220. data/test/test-plugin-expected/demo/Gemfile +0 -6
  221. data/test/test-theme-expected/demo/Gemfile +0 -6
  222. data/test/test.rb +0 -110
  223. data/test/test_suite.rb +0 -161
@@ -1 +0,0 @@
1
- body{margin:2px;padding:2px}.main{color:#444}body{background:black}.plugin-widget{background:red;color:#fff}
@@ -1 +0,0 @@
1
- <p>SUB BABY</p>
@@ -1 +0,0 @@
1
- Woohoo
@@ -1,23 +0,0 @@
1
- ## Simple assign
2
- yep → yep
3
- yep → yep
4
-
5
- ## Conditional assign
6
- '' → ''
7
- nope → nope
8
- nope → nope
9
- yep → yep
10
-
11
- ## Cascading assign
12
- nope → nope
13
- foo → foo
14
- '' → ''
15
-
16
- ## Additive assign
17
- yepyep → yepyep
18
-
19
- ## Complex assignment
20
- awesome → awesome
21
- AWESOME → AWESOME
22
- whatever-man → whatever-man
23
-
@@ -1,21 +0,0 @@
1
-
2
- ## Simple capture
3
- hi → hi
4
-
5
- ## Conditional capture
6
- '' → ''
7
- hi → hi
8
- '' → ''
9
- hi → hi
10
- hi → hi
11
-
12
- ## Additive capture
13
- hihi → hihi
14
-
15
- ## Complex capture
16
- hi → hi
17
- um, hi → um, hi
18
-
19
-
20
- ## Test filters
21
- foo bar baz booga → foo bar baz booga
@@ -1 +0,0 @@
1
- Testing content_for → Testing content_for
@@ -1,4 +0,0 @@
1
- omg → omg
2
- OMG → OMG
3
- BOOGIE → BOOGIE
4
- boogie → boogie
@@ -1,33 +0,0 @@
1
-
2
-
3
- ## Testing a simple include
4
- Testing Include → Testing Include
5
-
6
- ## Local var passing
7
- Testing Include var_test → Testing Include var_test
8
-
9
- ## Filter testing
10
- TESTING INCLUDE → TESTING INCLUDE
11
- '' → ''
12
-
13
- ## Conditional Include
14
- '' → ''
15
- '' → ''
16
- '' → ''
17
- Testing Include → Testing Include
18
- Testing Include → Testing Include
19
- Testing Include var_test → Testing Include var_test
20
-
21
- ## Plugin wraps
22
- include from plugin → include from plugin
23
- Yo Dawg, I heard you like includes. → Yo Dawg, I heard you like includes.
24
- '' → ''
25
- Yo Dawg, I heard you like includes. → Yo Dawg, I heard you like includes.
26
-
27
- ## Ternary include
28
- , I heard you like includes. → , I heard you like includes.
29
- Testing Include → Testing Include
30
-
31
- ## Theme Include override
32
- include from theme override → include from theme override
33
-
@@ -1,34 +0,0 @@
1
-
2
-
3
-
4
-
5
-
6
-
7
- ## Simple render
8
- Testing Render → Testing Render
9
- Testing Render whatever → Testing Render whatever
10
-
11
- ## File name stored in variable
12
- Testing Render → Testing Render
13
-
14
- ## Post conditional render
15
- '' → ''
16
- Testing Render → Testing Render
17
-
18
- ## Test Variables
19
- kittens → kittens
20
-
21
- ## Test Filters
22
- KITTENS → KITTENS
23
- MITTENS → MITTENS
24
-
25
- ## Ternary include
26
- kittens → kittens
27
- Testing Render → Testing Render
28
-
29
- ## Render markdown with local vars
30
- <p><strong>page vars</strong></p> → <p><strong>page vars</strong></p>
31
-
32
- ## Render raw
33
- Testing Render {{ include.var }} → Testing Render {{ include.var }}
34
-
@@ -1,23 +0,0 @@
1
-
2
-
3
- ## Simple return
4
- bar → bar
5
-
6
- ## Conditional return
7
- bar → bar
8
- '' → ''
9
-
10
- ## Ternary return
11
- nope → nope
12
-
13
- ## Cascading return
14
- nope → nope
15
- bar → bar
16
-
17
- ## Test local variables
18
- yep → yep
19
-
20
- ## Returns with filters
21
- 2013-07-21T18:59:00-05:00 → 2013-07-21T18:59:00-05:00
22
- 2013-07-21T18:59:00-05:00 → 2013-07-21T18:59:00-05:00
23
-
@@ -1,29 +0,0 @@
1
-
2
-
3
- ## Testing a simple wrap
4
- [- Testing Include -] → [- Testing Include -]
5
-
6
- ## Local var passing
7
- [- Testing Include var_test -] → [- Testing Include var_test -]
8
-
9
- ## Filter testing
10
- [- TESTING INCLUDE -] → [- TESTING INCLUDE -]
11
- [= TESTING INCLUDE =] → [= TESTING INCLUDE =]
12
- [- TESTING FILTERS -] → [- TESTING FILTERS -]
13
-
14
- ## Conditional wrap
15
- '' → ''
16
- '' → ''
17
- [- Testing Include -] → [- Testing Include -]
18
- [- Testing Include -] → [- Testing Include -]
19
-
20
- ## Plugin wraps
21
- [- include from plugin -] → [- include from plugin -]
22
- [- Yo Dawg, I heard you like includes. -] → [- Yo Dawg, I heard you like includes. -]
23
-
24
- ## Wrap render
25
- [- Testing Render -] → [- Testing Render -]
26
-
27
- ## Wrap yield
28
-
29
- [- Testing wrap yield -] → [- Testing wrap yield -]
@@ -1 +0,0 @@
1
- .do-not-exist { background: black; }
@@ -1,5 +0,0 @@
1
- ---
2
- import: colors
3
- ---
4
- @import '{{ page.import }}';
5
- body { background: $bg; }
@@ -1 +0,0 @@
1
- _site
@@ -1 +0,0 @@
1
- Testing Render {{ include.var }}
@@ -1 +0,0 @@
1
- {% assign bar = site.render_test %}{{ bar }}
@@ -1,4 +0,0 @@
1
- ---
2
- foo: page vars
3
- ---
4
- **{{page.foo}}**
@@ -1,5 +0,0 @@
1
- ---
2
- layout: nil
3
- ---
4
-
5
- Woohoo {% abort if false %}
@@ -1,5 +0,0 @@
1
- ---
2
- ---
3
-
4
- {% abort if site.posts.size %}
5
- something
@@ -1,5 +0,0 @@
1
- ---
2
- layout: nil
3
- ---
4
-
5
- {% abort if true %}
@@ -1,26 +0,0 @@
1
- ---
2
- layout: nil
3
- ---
4
- ## Simple assign
5
- yep → {% assign var1 = 'yep' %}{{ var1 }}
6
- yep → {% assign var2 = 'yep' %}{{ var2 }}
7
-
8
- ## Conditional assign
9
- '' → '{% assign var3 = 'yep' unless true %}{{ var3 }}'
10
- nope → {% assign var4 = 'nope' if true %}{{ var4 }}
11
- nope → {% assign var4 ||= 'yep' %}{{ var4 }}
12
- yep → {% assign varz ||= 'yep' %}{{ varz }}
13
-
14
- ## Cascading assign
15
- nope → {% assign var6 = baz || var4 %}{{ var6 }}
16
- foo → {% assign var7 = baz || 'foo' %}{{ var7 }}
17
- '' → '{% assign var8 = baz || foo || nil %}{{ var8 }}'
18
-
19
- ## Additive assign
20
- yepyep → {% assign var1 += 'yep' %}{{ var1 }}
21
-
22
- ## Complex assignment
23
- awesome → {% assign var9 = (page.layout == 'nil' ? 'awesome' : 'lame' ) %}{{ var9 }}
24
- AWESOME → {% assign var10 = var9 | upcase %}{{ var10 }}
25
- whatever-man → {% assign var11 = 'whatever man' || nil | classify %}{{ var11 }}
26
-
@@ -1,31 +0,0 @@
1
- ---
2
- layout: nil
3
- ---
4
- {% assign some_bool = false %}
5
- ## Simple capture
6
- hi → {% capture var1 %}hi{% endcapture %}{{ var1 }}
7
-
8
- ## Conditional capture
9
- '' → '{% capture var2 unless true %}hi{% endcapture %}{{ var2 }}'
10
- hi → {% capture var3 if true %}hi{% endcapture %}{{ var3 }}
11
- '' → '{% capture var4 if some_bool %}hi{% endcapture %}{{ var4 }}'
12
- hi → {% capture var3 ||= %}nooooo{% endcapture %}{{ var3 }}
13
- hi → {% capture varz ||= %}hi{% endcapture %}{{ varz }}
14
-
15
- ## Additive capture
16
- hihi → {% capture var3 += if true %}hi{% endcapture %}{{ var3 }}
17
-
18
- ## Complex capture
19
- hi → {% capture var8 if false or page.layout %}hi{% endcapture %}{{ var8 }}
20
- um, hi → {% capture var9 if false or page.layout %}
21
- {% assign var10 = 'hi' %}
22
- um, {{ var10 }}
23
- {% endcapture %}{{ var9 }}
24
-
25
- ## Test filters
26
- foo bar baz booga → {% capture filters | join_lines:' ' %}
27
- foo
28
- bar
29
- baz
30
- booga
31
- {% endcapture %}{{ filters }}
@@ -1,7 +0,0 @@
1
- ---
2
- ---
3
- Testing content_for → {% content_for test %}
4
- Testing
5
- {% endcontent_for %}{% content_for test %}
6
- content_for
7
- {% endcontent_for %}{% yield test | join_lines:' ' %}
@@ -1,6 +0,0 @@
1
- ---
2
- ---
3
- omg → {% filter %}omg{% endfilter %}
4
- OMG → {% filter | upcase %}omg{% endfilter %}
5
- BOOGIE → {% filter | upcase if true %} boogie {% endfilter %}
6
- boogie → {% filter | upcase unless true %} boogie {% endfilter %}
@@ -1,36 +0,0 @@
1
- ---
2
- layout: nil
3
- ---
4
- {% assign some_bool = true %}
5
-
6
- ## Testing a simple include
7
- Testing Include → {% include foo.html %}
8
-
9
- ## Local var passing
10
- Testing Include var_test → {% include foo.html some_var="var_test" %}
11
-
12
- ## Filter testing
13
- TESTING INCLUDE → {% include foo.html | upcase %}
14
- '' → '{% include foo.html | upcase unless true %}'
15
-
16
- ## Conditional Include
17
- '' → '{% include foo.html unless true %}'
18
- '' → '{% include foo.html unless some_bool %}'
19
- '' → '{% include foo.html unless site.name == 'Your New Jekyll Site' %}'
20
- Testing Include → {% include foo.html if true %}
21
- Testing Include → {% include foo.html if site.name == 'Your New Jekyll Site' %}
22
- Testing Include var_test → {% include foo.html some_var="var_test" if some_bool %}
23
-
24
- ## Plugin wraps
25
- include from plugin → {% include awesome-sauce:some-include.html %}
26
- Yo Dawg, I heard you like includes. → {% include theme:greet.html greeting="Yo Dawg" %}
27
- '' → '{% include theme:greet.html greeting="Yo Dawg" unless some_bool %}'
28
- Yo Dawg, I heard you like includes. → {% include theme:greet.html greeting="Yo Dawg" if some_bool %}
29
-
30
- ## Ternary include
31
- , I heard you like includes. → {% include (false ? foo.html : theme:greet.html) %}
32
- Testing Include → {% include (some_bool ? foo.html : theme:greet.html) %}
33
-
34
- ## Theme Include override
35
- include from theme override → {% include theme:bar.html %}
36
-
@@ -1,36 +0,0 @@
1
- ---
2
- layout: nil
3
- ---
4
- {% assign file = 'test_render/_f.html' %}
5
- {% assign file2 = 'test_render/_var.html' %}
6
- {% assign relative = './_test_render.md' %}
7
- {% assign some_bool = true %}
8
- {% assign test_var = 'variable' %}
9
-
10
- ## Simple render
11
- Testing Render → {% render test_render/_f.html %}
12
- Testing Render whatever → {% render test_render/_f.html var="whatever" %}
13
-
14
- ## File name stored in variable
15
- Testing Render → {% render file %}
16
-
17
- ## Post conditional render
18
- '' → '{% render file unless true %}'
19
- Testing Render → {% render file if some_bool %}
20
-
21
- ## Test Variables
22
- kittens → {% render test_render/_var.html %}
23
-
24
- ## Test Filters
25
- KITTENS → {% render test_render/_var.html | upcase %}
26
- MITTENS → {% render test_render/_var.html | replace:"k","m" | upcase %}
27
-
28
- ## Ternary include
29
- kittens → {% render (false ? file : file2) %}
30
- Testing Render → {% render (some_bool ? file : file2) %}
31
-
32
- ## Render markdown with local vars
33
- <p><strong>page vars</strong></p> → {% render relative %}
34
-
35
- ## Render raw
36
- {% raw %}Testing Render {{ include.var }}{% endraw %} → {% render raw file %}
@@ -1,30 +0,0 @@
1
- ---
2
- layout: nil
3
- date: 2013-07-21 18:59
4
- people:
5
- - { name: Bill }
6
- - { name: Bob }
7
- ---
8
- {% assign foo = 'bar' %}
9
-
10
- ## Simple return
11
- bar → {% return foo %}
12
-
13
- ## Conditional return
14
- bar → {% return foo if foo %}
15
- '' → '{% return foo unless foo == 'bar' %}'
16
-
17
- ## Ternary return
18
- nope → {% return (foo == 'baz' ? foo : 'nope') %}
19
-
20
- ## Cascading return
21
- nope → {% return bingo || fez || 'nope' %}
22
- bar → {% return bingo || fez || foo %}
23
-
24
- ## Test local variables
25
- yep → {% for person in page.people %}{% return 'yep' if person.name == 'Bill' %}{% endfor %}
26
-
27
- ## Returns with filters
28
- 2013-07-21T18:59:00-05:00 → {% return post.date or page.date | datetime | date_to_xmlschema %}
29
- 2013-07-21T18:59:00-05:00 → {% return (false ? post.date : page.date) | datetime | date_to_xmlschema %}
30
-
@@ -1,32 +0,0 @@
1
- ---
2
- layout: nil
3
- ---
4
- {% assign some_bool = true %}
5
-
6
- ## Testing a simple wrap
7
- [- Testing Include -] → {% wrap include foo.html %}[- {{ yield }} -]{% endwrap %}
8
-
9
- ## Local var passing
10
- [- Testing Include var_test -] → {% wrap include foo.html some_var="var_test" %}[- {{ yield }} -]{% endwrap %}
11
-
12
- ## Filter testing
13
- [- TESTING INCLUDE -] → {% wrap include foo.html | upcase %}[- {% assign foo = 'bar' %}{{ yield }} -]{% endwrap %}
14
- [= TESTING INCLUDE =] → {% wrap include foo.html | replace:"-","=" %}[- {{ yield | upcase }} -]{% endwrap %}
15
- [- TESTING FILTERS -] → {% wrap include foo.html | replace:"INCLUDE","FILTERS" %}[- {{ yield | upcase }} -]{% endwrap %}
16
-
17
- ## Conditional wrap
18
- '' → '{% wrap include foo.html unless true %}[- {{ yield }} -]{% endwrap %}'
19
- '' → '{% wrap include foo.html unless some_bool %}[- {{ yield }} -]{% endwrap %}'
20
- [- Testing Include -] → {% wrap include foo.html if true %}[- {{ yield }} -]{% endwrap %}
21
- [- Testing Include -] → {% wrap include foo.html if some_bool %}[- {{ yield }} -]{% endwrap %}
22
-
23
- ## Plugin wraps
24
- [- include from plugin -] → {% wrap include awesome-sauce:some-include.html %}[- {{ yield }} -]{% endwrap %}
25
- [- Yo Dawg, I heard you like includes. -] → {% wrap include theme:greet.html greeting="Yo Dawg" %}[- {{ yield }} -]{% endwrap %}
26
-
27
- ## Wrap render
28
- [- Testing Render -] → {% wrap render test_render/_f.html %}[- {{ yield }} -]{% endwrap %}
29
-
30
- ## Wrap yield
31
- {% content_for test %}Testing wrap yield{% endcontent_for %}
32
- [- Testing wrap yield -] → {% wrap yield test %}[- {{ yield }} -]{% endwrap %}