octopress-ink 1.0.0.alpha.24 → 1.0.0.alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/octopress-ink/assets/asset.rb +19 -19
- data/lib/octopress-ink/assets/config.rb +6 -6
- data/lib/octopress-ink/assets/javascript.rb +1 -1
- data/lib/octopress-ink/assets/layout.rb +4 -4
- data/lib/octopress-ink/assets/root.rb +3 -3
- data/lib/octopress-ink/assets/sass.rb +13 -13
- data/lib/octopress-ink/assets/stylesheet.rb +1 -1
- data/lib/octopress-ink/filters.rb +115 -0
- data/lib/octopress-ink/generators/plugin_assets.rb +4 -2
- data/lib/octopress-ink/helpers/conditional.rb +1 -1
- data/lib/octopress-ink/helpers/content_for.rb +1 -1
- data/lib/octopress-ink/helpers/path.rb +2 -2
- data/lib/octopress-ink/helpers/titlecase.rb +36 -0
- data/lib/octopress-ink/helpers/var.rb +63 -3
- data/lib/octopress-ink/jekyll/hooks.rb +3 -0
- data/lib/octopress-ink/plugin.rb +15 -15
- data/lib/octopress-ink/plugins/stylesheets.rb +11 -9
- data/lib/octopress-ink/plugins.rb +78 -67
- data/lib/octopress-ink/tags/assign.rb +1 -1
- data/lib/octopress-ink/tags/include.rb +13 -3
- data/lib/octopress-ink/tags/javascript.rb +1 -5
- data/lib/octopress-ink/tags/line_comment.rb +7 -0
- data/lib/octopress-ink/tags/render.rb +12 -3
- data/lib/octopress-ink/tags/return.rb +1 -1
- data/lib/octopress-ink/tags/stylesheet.rb +1 -5
- data/lib/octopress-ink/tags/wrap.rb +3 -3
- data/lib/octopress-ink/tags/yield.rb +14 -3
- data/lib/octopress-ink/tags.rb +1 -0
- data/lib/octopress-ink/version.rb +1 -1
- data/lib/octopress-ink.rb +5 -0
- data/test/expected/test_tags/assign.html +1 -0
- data/test/expected/test_tags/content_for.html +4 -1
- data/test/expected/test_tags/include.html +4 -0
- data/test/expected/test_tags/render.html +4 -0
- data/test/expected/test_tags/wrap.html +7 -0
- data/test/site/test_tags/assign.html +1 -0
- data/test/site/test_tags/content_for.html +4 -1
- data/test/site/test_tags/include.html +4 -0
- data/test/site/test_tags/render.html +4 -0
- data/test/site/test_tags/wrap.html +7 -0
- data/test/source/test_tags/assign.html +1 -0
- data/test/source/test_tags/content_for.html +19 -4
- data/test/source/test_tags/include.html +4 -0
- data/test/source/test_tags/render.html +4 -0
- data/test/source/test_tags/return.html +1 -1
- data/test/source/test_tags/wrap.html +7 -0
- data/test/test.rb +2 -1
- metadata +5 -22
- data/test/expected/test_tags/footer.html +0 -3
- data/test/expected/test_tags/head.html +0 -4
- data/test/expected/test_tags/scripts.html +0 -4
- data/test/site/test_tags/footer.html +0 -3
- data/test/site/test_tags/head.html +0 -4
- data/test/site/test_tags/scripts.html +0 -4
- data/test/source/_layouts/content_for.html +0 -3
- data/test/source/test_tags/footer.html +0 -6
- data/test/source/test_tags/head.html +0 -10
- data/test/source/test_tags/scripts.html +0 -6
@@ -1,7 +1,9 @@
|
|
1
1
|
module Octopress
|
2
2
|
module Plugins
|
3
|
+
|
3
4
|
@plugins = []
|
4
5
|
@local_plugins = []
|
6
|
+
@site = nil
|
5
7
|
|
6
8
|
def self.theme
|
7
9
|
@theme
|
@@ -23,18 +25,23 @@ module Octopress
|
|
23
25
|
[@theme].concat(@plugins).concat(@local_plugins).compact
|
24
26
|
end
|
25
27
|
|
26
|
-
def self.
|
28
|
+
def self.site
|
29
|
+
@site
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.config(site=nil)
|
33
|
+
@site ||= site
|
27
34
|
if @config
|
28
35
|
@config
|
29
36
|
else
|
30
37
|
@config = {}
|
31
38
|
@config['plugins'] = {}
|
32
|
-
@config['theme'] = @theme.configs
|
39
|
+
@config['theme'] = @theme.nil? ? {} : @theme.configs
|
33
40
|
|
34
41
|
|
35
42
|
plugins.each do |p|
|
36
43
|
unless p == @theme
|
37
|
-
@config['plugins'][p.name] = p.configs
|
44
|
+
@config['plugins'][p.name] = p.configs
|
38
45
|
end
|
39
46
|
end
|
40
47
|
|
@@ -42,9 +49,9 @@ module Octopress
|
|
42
49
|
end
|
43
50
|
end
|
44
51
|
|
45
|
-
def self.include(name, file
|
52
|
+
def self.include(name, file)
|
46
53
|
p = plugin(name)
|
47
|
-
p.include(file
|
54
|
+
p.include(file)
|
48
55
|
end
|
49
56
|
|
50
57
|
def self.register_plugin(plugin, name, type='plugin')
|
@@ -60,13 +67,14 @@ module Octopress
|
|
60
67
|
end
|
61
68
|
end
|
62
69
|
|
63
|
-
def self.register_layouts
|
70
|
+
def self.register_layouts
|
64
71
|
plugins.each do |p|
|
65
|
-
p.layouts.clone.each { |layout| layout.register
|
72
|
+
p.layouts.clone.each { |layout| layout.register }
|
66
73
|
end
|
67
74
|
end
|
68
75
|
|
69
|
-
def self.custom_dir
|
76
|
+
def self.custom_dir
|
77
|
+
config = @site.config
|
70
78
|
if config['octopress'] and config['octopress']['custom']
|
71
79
|
config['octopress']['custom']
|
72
80
|
else
|
@@ -88,8 +96,8 @@ module Octopress
|
|
88
96
|
File.join('javascripts', "#{print}.js")
|
89
97
|
end
|
90
98
|
|
91
|
-
def self.write_files(
|
92
|
-
site.static_files << StaticFileContent.new(source, dest)
|
99
|
+
def self.write_files(source, dest)
|
100
|
+
@site.static_files << StaticFileContent.new(source, dest)
|
93
101
|
end
|
94
102
|
|
95
103
|
def self.compile_sass_file(path, options)
|
@@ -100,38 +108,39 @@ module Octopress
|
|
100
108
|
::Sass.compile(contents, options)
|
101
109
|
end
|
102
110
|
|
103
|
-
def self.sass_config(
|
104
|
-
|
105
|
-
|
111
|
+
def self.sass_config(item, default)
|
112
|
+
config = @site.config
|
113
|
+
if config['octopress'] && config['octopress']['sass'] && config['octopress']['sass'][item]
|
114
|
+
config['octopress']['sass'][item]
|
106
115
|
else
|
107
116
|
default
|
108
117
|
end
|
109
118
|
end
|
110
119
|
|
111
|
-
def self.sass_options
|
120
|
+
def self.sass_options
|
112
121
|
options = {
|
113
|
-
style: sass_config(
|
114
|
-
trace: sass_config(
|
115
|
-
line_numbers: sass_config(
|
122
|
+
style: sass_config('output_style', 'compressed').to_sym,
|
123
|
+
trace: sass_config('trace', false),
|
124
|
+
line_numbers: sass_config('line_numbers', false)
|
116
125
|
}
|
117
126
|
end
|
118
127
|
|
119
|
-
def self.write_combined_stylesheet
|
120
|
-
css = combine_stylesheets
|
128
|
+
def self.write_combined_stylesheet
|
129
|
+
css = combine_stylesheets
|
121
130
|
css.keys.each do |media|
|
122
|
-
options = sass_options
|
131
|
+
options = sass_options
|
123
132
|
options[:line_numbers] = false
|
124
133
|
contents = compile_sass(css[media][:contents], options)
|
125
|
-
write_files(
|
134
|
+
write_files(contents, combined_stylesheet_path(media))
|
126
135
|
end
|
127
136
|
end
|
128
137
|
|
129
|
-
def self.write_combined_javascript
|
130
|
-
js = combine_javascripts
|
131
|
-
write_files(
|
138
|
+
def self.write_combined_javascript
|
139
|
+
js = combine_javascripts
|
140
|
+
write_files(js, combined_javascript_path) unless js == ''
|
132
141
|
end
|
133
142
|
|
134
|
-
def self.combine_stylesheets
|
143
|
+
def self.combine_stylesheets
|
135
144
|
unless @combined_stylesheets
|
136
145
|
css = {}
|
137
146
|
paths = {}
|
@@ -150,11 +159,11 @@ module Octopress
|
|
150
159
|
|
151
160
|
# Add Sass files
|
152
161
|
if file.respond_to? :compile
|
153
|
-
css[file.media][:contents].concat file.compile
|
162
|
+
css[file.media][:contents].concat file.compile
|
154
163
|
else
|
155
|
-
css[file.media][:contents].concat file.path
|
164
|
+
css[file.media][:contents].concat file.path.read.strip
|
156
165
|
end
|
157
|
-
css[file.media][:paths] << file.path
|
166
|
+
css[file.media][:paths] << file.path
|
158
167
|
plugin_header = ''
|
159
168
|
end
|
160
169
|
end
|
@@ -167,11 +176,11 @@ module Octopress
|
|
167
176
|
@combined_stylesheets
|
168
177
|
end
|
169
178
|
|
170
|
-
def self.combine_javascripts
|
179
|
+
def self.combine_javascripts
|
171
180
|
unless @combined_javascripts
|
172
181
|
js = ''
|
173
182
|
plugins.each do |plugin|
|
174
|
-
paths = plugin.javascript_paths
|
183
|
+
paths = plugin.javascript_paths
|
175
184
|
@javascript_fingerprint = fingerprint(paths)
|
176
185
|
paths.each do |file|
|
177
186
|
js.concat Pathname.new(file).read
|
@@ -182,23 +191,23 @@ module Octopress
|
|
182
191
|
@combined_javascripts
|
183
192
|
end
|
184
193
|
|
185
|
-
def self.combined_stylesheet_tag
|
194
|
+
def self.combined_stylesheet_tag
|
186
195
|
tags = ''
|
187
|
-
combine_stylesheets
|
188
|
-
tags.concat "<link href='
|
196
|
+
combine_stylesheets.keys.each do |media|
|
197
|
+
tags.concat "<link href='#{Filters.expand_url(combined_stylesheet_path(media))}' media='#{media}' rel='stylesheet' type='text/css'>"
|
189
198
|
end
|
190
199
|
tags
|
191
200
|
end
|
192
201
|
|
193
|
-
def self.combined_javascript_tag
|
194
|
-
unless combine_javascripts
|
195
|
-
"<script src='
|
202
|
+
def self.combined_javascript_tag
|
203
|
+
unless combine_javascripts == ''
|
204
|
+
"<script src='#{Filters.expand_url(combined_javascript_path)}'></script>"
|
196
205
|
end
|
197
206
|
end
|
198
207
|
|
199
|
-
def self.stylesheet_tags
|
200
|
-
if concat_css
|
201
|
-
combined_stylesheet_tag
|
208
|
+
def self.stylesheet_tags
|
209
|
+
if concat_css
|
210
|
+
combined_stylesheet_tag
|
202
211
|
else
|
203
212
|
css = []
|
204
213
|
plugins.each do |plugin|
|
@@ -209,25 +218,27 @@ module Octopress
|
|
209
218
|
end
|
210
219
|
end
|
211
220
|
|
212
|
-
def self.concat_css
|
213
|
-
|
214
|
-
|
221
|
+
def self.concat_css
|
222
|
+
config = @site.config
|
223
|
+
if config['octopress'] && !config['octopress']['concat_css'].nil?
|
224
|
+
config['octopress']['concat_css'] != false
|
215
225
|
else
|
216
226
|
true
|
217
227
|
end
|
218
228
|
end
|
219
229
|
|
220
|
-
def self.concat_js
|
221
|
-
|
222
|
-
|
230
|
+
def self.concat_js
|
231
|
+
config = @site.config
|
232
|
+
if config['octopress'] && !config['octopress']['concat_js'].nil?
|
233
|
+
config['octopress']['concat_js'] != false
|
223
234
|
else
|
224
235
|
true
|
225
236
|
end
|
226
237
|
end
|
227
238
|
|
228
|
-
def self.javascript_tags
|
229
|
-
if concat_js
|
230
|
-
combined_javascript_tag
|
239
|
+
def self.javascript_tags
|
240
|
+
if concat_js
|
241
|
+
combined_javascript_tag
|
231
242
|
else
|
232
243
|
js = []
|
233
244
|
plugins.each do |plugin|
|
@@ -237,54 +248,54 @@ module Octopress
|
|
237
248
|
end
|
238
249
|
end
|
239
250
|
|
240
|
-
def self.copy_javascripts
|
251
|
+
def self.copy_javascripts
|
241
252
|
plugins.each do |plugin|
|
242
|
-
copy
|
253
|
+
copy plugin.javascripts
|
243
254
|
end
|
244
255
|
end
|
245
256
|
|
246
|
-
def self.copy_stylesheets
|
257
|
+
def self.copy_stylesheets
|
247
258
|
stylesheets = plugins.clone.map {
|
248
259
|
|p| p.stylesheets.clone.concat(p.sass)
|
249
260
|
}.flatten
|
250
|
-
copy
|
261
|
+
copy stylesheets
|
251
262
|
end
|
252
263
|
|
253
|
-
def self.add_static_files
|
264
|
+
def self.add_static_files
|
254
265
|
|
255
|
-
plugin('user stylesheets').add_files
|
266
|
+
plugin('user stylesheets').add_files
|
256
267
|
|
257
268
|
# Copy/Generate Stylesheets
|
258
269
|
#
|
259
|
-
if concat_css
|
260
|
-
write_combined_stylesheet
|
270
|
+
if concat_css
|
271
|
+
write_combined_stylesheet
|
261
272
|
else
|
262
|
-
copy_stylesheets
|
273
|
+
copy_stylesheets
|
263
274
|
end
|
264
275
|
|
265
276
|
# Copy/Generate Javascripts
|
266
277
|
#
|
267
|
-
if concat_js
|
268
|
-
write_combined_javascript
|
278
|
+
if concat_js
|
279
|
+
write_combined_javascript
|
269
280
|
else
|
270
|
-
copy_javascripts
|
281
|
+
copy_javascripts
|
271
282
|
end
|
272
283
|
|
273
284
|
# Copy other assets
|
274
285
|
#
|
275
|
-
copy_static_files
|
286
|
+
copy_static_files
|
276
287
|
end
|
277
288
|
|
278
|
-
def self.copy_static_files
|
289
|
+
def self.copy_static_files
|
279
290
|
plugins.each do |plugin|
|
280
|
-
copy
|
281
|
-
copy
|
282
|
-
copy
|
291
|
+
copy plugin.files
|
292
|
+
copy plugin.images
|
293
|
+
copy plugin.fonts
|
283
294
|
end
|
284
295
|
end
|
285
296
|
|
286
|
-
def self.copy(files
|
287
|
-
files.each { |f| f.copy
|
297
|
+
def self.copy(files)
|
298
|
+
files.each { |f| f.copy }
|
288
299
|
end
|
289
300
|
end
|
290
301
|
end
|
@@ -22,7 +22,7 @@ module Octopress
|
|
22
22
|
|
23
23
|
context = Helpers::Var.set_var(var, operator, value, context)
|
24
24
|
else
|
25
|
-
raise SyntaxError.new("Syntax Error in 'assign' - Valid syntax: assign [var] = [source]")
|
25
|
+
raise SyntaxError.new("Syntax Error in 'assign tag': #{@markup} - Valid syntax: assign [var] = [source] | filter")
|
26
26
|
end
|
27
27
|
''
|
28
28
|
end
|
@@ -10,6 +10,10 @@ module Octopress
|
|
10
10
|
|
11
11
|
def render(context)
|
12
12
|
markup = Helpers::Conditional.parse(@markup, context)
|
13
|
+
if markup =~ Helpers::Var::HAS_FILTERS
|
14
|
+
markup = $1
|
15
|
+
filters = $2
|
16
|
+
end
|
13
17
|
return unless markup
|
14
18
|
markup = Helpers::Var.evaluate_ternary(markup, context)
|
15
19
|
markup = Helpers::Path.parse(markup, context)
|
@@ -21,20 +25,26 @@ module Octopress
|
|
21
25
|
plugin = $1
|
22
26
|
path = $2
|
23
27
|
begin
|
24
|
-
content = Plugins.include(plugin, path
|
28
|
+
content = Plugins.include(plugin, path).read
|
25
29
|
rescue => error
|
26
30
|
raise IOError.new "Include failed: {% #{@tag_name} #{@og_markup}%}. The plugin '#{plugin}' does not have an include named '#{path}'."
|
27
31
|
end
|
28
32
|
partial = Liquid::Template.parse(content)
|
29
|
-
context.stack {
|
33
|
+
content = context.stack {
|
30
34
|
context['include'] = include_tag.parse_params(context)
|
31
35
|
partial.render!(context)
|
32
36
|
}.strip
|
33
37
|
|
34
38
|
# Otherwise, use Jekyll's default include tag
|
35
39
|
else
|
36
|
-
include_tag.render(context).strip
|
40
|
+
content = include_tag.render(context).strip
|
41
|
+
end
|
42
|
+
|
43
|
+
unless content.nil? || filters.nil?
|
44
|
+
content = Helpers::Var.render_filters(content, filters, context)
|
37
45
|
end
|
46
|
+
|
47
|
+
content
|
38
48
|
end
|
39
49
|
end
|
40
50
|
end
|
@@ -1,12 +1,8 @@
|
|
1
1
|
module Octopress
|
2
2
|
module Tags
|
3
3
|
class JavascriptTag < Liquid::Tag
|
4
|
-
def initialize(tag_name, markup, tokens)
|
5
|
-
super
|
6
|
-
end
|
7
4
|
def render(context)
|
8
|
-
|
9
|
-
Plugins.javascript_tags(site)
|
5
|
+
Plugins.javascript_tags
|
10
6
|
end
|
11
7
|
end
|
12
8
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Octopress
|
2
2
|
module Tags
|
3
3
|
class RenderTag < Liquid::Tag
|
4
|
-
SYNTAX = /(\S+)(.+)
|
4
|
+
SYNTAX = /(\S+)(.+)?/
|
5
5
|
|
6
6
|
def initialize(tag_name, markup, tokens)
|
7
7
|
super
|
@@ -14,6 +14,10 @@ module Octopress
|
|
14
14
|
|
15
15
|
def render(context)
|
16
16
|
markup = Helpers::Conditional.parse(@markup, context)
|
17
|
+
if markup =~ Helpers::Var::HAS_FILTERS
|
18
|
+
markup = $1
|
19
|
+
filters = $2
|
20
|
+
end
|
17
21
|
return unless markup
|
18
22
|
markup = Helpers::Var.evaluate_ternary(markup, context)
|
19
23
|
markup = Helpers::Path.parse(markup, context)
|
@@ -36,8 +40,13 @@ module Octopress
|
|
36
40
|
partial.render!(context)
|
37
41
|
}.strip
|
38
42
|
|
39
|
-
parse_convertible(content, context)
|
40
|
-
|
43
|
+
content = parse_convertible(content, context)
|
44
|
+
|
45
|
+
unless content.nil? || filters.nil?
|
46
|
+
content = Helpers::Var.render_filters(content, filters, context)
|
47
|
+
end
|
48
|
+
|
49
|
+
content
|
41
50
|
end
|
42
51
|
|
43
52
|
def read(markup, context)
|
@@ -1,12 +1,8 @@
|
|
1
1
|
module Octopress
|
2
2
|
module Tags
|
3
3
|
class StylesheetTag < Liquid::Tag
|
4
|
-
def initialize(tag_name, markup, tokens)
|
5
|
-
super
|
6
|
-
end
|
7
4
|
def render(context)
|
8
|
-
|
9
|
-
Plugins.stylesheet_tags(site)
|
5
|
+
Plugins.stylesheet_tags
|
10
6
|
end
|
11
7
|
end
|
12
8
|
end
|
@@ -16,16 +16,16 @@ module Octopress
|
|
16
16
|
|
17
17
|
case @tag_name
|
18
18
|
when 'wrap_yield'
|
19
|
-
content =
|
19
|
+
content = Tags::YieldTag.new('yield', markup, []).render(context)
|
20
20
|
when 'wrap_render'
|
21
21
|
begin
|
22
|
-
content =
|
22
|
+
content = Tags::RenderTag.new('render', markup, []).render(context)
|
23
23
|
rescue => error
|
24
24
|
error_msg error
|
25
25
|
end
|
26
26
|
when 'wrap'
|
27
27
|
begin
|
28
|
-
content =
|
28
|
+
content = Tags::IncludeTag.new('include', markup, []).render(context)
|
29
29
|
rescue => error
|
30
30
|
error_msg error
|
31
31
|
end
|
@@ -3,19 +3,30 @@
|
|
3
3
|
module Octopress
|
4
4
|
module Tags
|
5
5
|
class YieldTag < Liquid::Tag
|
6
|
+
|
6
7
|
def initialize(tag_name, markup, tokens)
|
7
8
|
super
|
9
|
+
@markup = markup
|
10
|
+
if markup =~ Helpers::Var::HAS_FILTERS
|
11
|
+
markup = $1
|
12
|
+
@filters = $2
|
13
|
+
end
|
8
14
|
@block_name = Helpers::ContentFor.get_block_name(tag_name, markup)
|
9
15
|
end
|
10
16
|
|
11
17
|
def render(context)
|
12
18
|
markup = Helpers::Conditional.parse(@markup, context)
|
13
19
|
return unless markup
|
14
|
-
|
15
20
|
content = Helpers::ContentFor.render(context, @block_name)
|
16
|
-
|
17
|
-
|
21
|
+
|
22
|
+
unless content.nil? || @filters.nil?
|
23
|
+
content = Helpers::Var.render_filters(content, @filters, context)
|
18
24
|
end
|
25
|
+
|
26
|
+
if @block_name == 'head' && ENV['OCTOPRESS_ENV'] != 'TEST'
|
27
|
+
content.insert 0, "<meta name='generator' content='Octopress #{Octopress::Ink::VERSION}'>"
|
28
|
+
end
|
29
|
+
|
19
30
|
content
|
20
31
|
end
|
21
32
|
end
|
data/lib/octopress-ink/tags.rb
CHANGED
data/lib/octopress-ink.rb
CHANGED
@@ -6,11 +6,13 @@ require 'octopress-ink/version'
|
|
6
6
|
require 'octopress-ink/generators/plugin_assets'
|
7
7
|
require 'octopress-ink/jekyll/hooks'
|
8
8
|
require 'octopress-ink/version'
|
9
|
+
require 'octopress-ink/helpers/titlecase'
|
9
10
|
|
10
11
|
module Octopress
|
11
12
|
CUSTOM_DIR = "_custom"
|
12
13
|
|
13
14
|
autoload :Helpers, 'octopress-ink/helpers'
|
15
|
+
autoload :Filters, 'octopress-ink/filters'
|
14
16
|
autoload :Assets, 'octopress-ink/assets'
|
15
17
|
autoload :StaticFile, 'octopress-ink/assets/static_file'
|
16
18
|
autoload :StaticFileContent, 'octopress-ink/assets/static_file_content'
|
@@ -24,6 +26,8 @@ module Octopress
|
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
29
|
+
Liquid::Template.register_filter Octopress::Filters
|
30
|
+
|
27
31
|
Liquid::Template.register_tag('include', Octopress::Tags::IncludeTag)
|
28
32
|
Liquid::Template.register_tag('assign', Octopress::Tags::AssignTag)
|
29
33
|
Liquid::Template.register_tag('capture', Octopress::Tags::CaptureTag)
|
@@ -39,6 +43,7 @@ Liquid::Template.register_tag('yield', Octopress::Tags::YieldTag)
|
|
39
43
|
Liquid::Template.register_tag('wrap_yield', Octopress::Tags::WrapTag)
|
40
44
|
Liquid::Template.register_tag('wrap_render', Octopress::Tags::WrapTag)
|
41
45
|
Liquid::Template.register_tag('wrap', Octopress::Tags::WrapTag)
|
46
|
+
Liquid::Template.register_tag('_', Octopress::Tags::LineCommentTag)
|
42
47
|
|
43
48
|
Octopress.register_plugin(Octopress::StylesheetsPlugin, 'user stylesheets', 'local_plugin')
|
44
49
|
|
@@ -6,6 +6,10 @@
|
|
6
6
|
## Local var passing
|
7
7
|
[- Testing Include var_test -] → [- Testing Include var_test -]
|
8
8
|
|
9
|
+
## Filter testing
|
10
|
+
[- TESTING INCLUDE -] → [- TESTING INCLUDE -]
|
11
|
+
[- TESTING FILTERS -] → [- TESTING FILTERS -]
|
12
|
+
|
9
13
|
## Conditional wrap
|
10
14
|
'' → ''
|
11
15
|
'' → ''
|
@@ -19,3 +23,6 @@
|
|
19
23
|
## Wrap render
|
20
24
|
[- Testing Render -] → [- Testing Render -]
|
21
25
|
|
26
|
+
## Wrap yield
|
27
|
+
|
28
|
+
[- Testing wrap yield -] → [- Testing wrap yield -]
|
@@ -6,6 +6,10 @@
|
|
6
6
|
## Local var passing
|
7
7
|
[- Testing Include var_test -] → [- Testing Include var_test -]
|
8
8
|
|
9
|
+
## Filter testing
|
10
|
+
[- TESTING INCLUDE -] → [- TESTING INCLUDE -]
|
11
|
+
[- TESTING FILTERS -] → [- TESTING FILTERS -]
|
12
|
+
|
9
13
|
## Conditional wrap
|
10
14
|
'' → ''
|
11
15
|
'' → ''
|
@@ -19,3 +23,6 @@
|
|
19
23
|
## Wrap render
|
20
24
|
[- Testing Render -] → [- Testing Render -]
|
21
25
|
|
26
|
+
## Wrap yield
|
27
|
+
|
28
|
+
[- Testing wrap yield -] → [- Testing wrap yield -]
|
@@ -22,4 +22,5 @@ yepyep → {% assign var1 += 'yep' %}{{ var1 }}
|
|
22
22
|
## Complex assignment
|
23
23
|
awesome → {% assign var9 = (page.layout == 'nil' ? 'awesome' : 'lame' ) %}{{ var9 }}
|
24
24
|
AWESOME → {% assign var10 = var9 | upcase %}{{ var10 }}
|
25
|
+
whatever-man → {% assign var11 = 'whatever man' || nil | classify %}{{ var11 }}
|
25
26
|
|