nanoc3 3.1.6 → 3.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.md +4 -0
- data/lib/nanoc3.rb +1 -1
- data/lib/nanoc3/base/item_rep.rb +1 -1
- data/lib/nanoc3/base/plugin_registry.rb +1 -1
- data/lib/nanoc3/cli/commands/create_site.rb +5 -3
- data/lib/nanoc3/filters/erb.rb +5 -1
- data/lib/nanoc3/filters/erubis.rb +5 -1
- data/lib/nanoc3/filters/haml.rb +2 -1
- data/lib/nanoc3/filters/sass.rb +1 -4
- metadata +4 -20
data/NEWS.md
CHANGED
data/lib/nanoc3.rb
CHANGED
data/lib/nanoc3/base/item_rep.rb
CHANGED
@@ -442,7 +442,7 @@ module Nanoc3
|
|
442
442
|
def filter_for_layout(layout)
|
443
443
|
# Get filter name and args
|
444
444
|
filter_name, filter_args = @item.site.compiler.filter_for_layout(layout)
|
445
|
-
raise Nanoc3::Errors::CannotDetermineFilter.new(
|
445
|
+
raise Nanoc3::Errors::CannotDetermineFilter.new(layout.identifier) if filter_name.nil?
|
446
446
|
|
447
447
|
# Get filter class
|
448
448
|
filter_class = Nanoc3::Filter.named(filter_name)
|
@@ -156,18 +156,20 @@ a:hover {
|
|
156
156
|
line-height: 20px;
|
157
157
|
}
|
158
158
|
|
159
|
-
#main ul {
|
159
|
+
#main ul, #main ol {
|
160
160
|
margin: 20px;
|
161
161
|
}
|
162
162
|
|
163
163
|
#main li {
|
164
|
-
list-style-type: square;
|
165
|
-
|
166
164
|
font-size: 15px;
|
167
165
|
|
168
166
|
line-height: 20px;
|
169
167
|
}
|
170
168
|
|
169
|
+
#main ul li {
|
170
|
+
list-style-type: square;
|
171
|
+
}
|
172
|
+
|
171
173
|
#sidebar {
|
172
174
|
position: absolute;
|
173
175
|
|
data/lib/nanoc3/filters/erb.rb
CHANGED
@@ -15,10 +15,14 @@ module Nanoc3::Filters
|
|
15
15
|
# Create context
|
16
16
|
context = ::Nanoc3::Context.new(assigns)
|
17
17
|
|
18
|
+
# Get binding
|
19
|
+
proc = assigns[:content] ? lambda { assigns[:content] } : nil
|
20
|
+
assigns_binding = context.get_binding(&proc)
|
21
|
+
|
18
22
|
# Get result
|
19
23
|
erb = ::ERB.new(content)
|
20
24
|
erb.filename = filename
|
21
|
-
erb.result(
|
25
|
+
erb.result(assigns_binding)
|
22
26
|
end
|
23
27
|
|
24
28
|
end
|
@@ -15,8 +15,12 @@ module Nanoc3::Filters
|
|
15
15
|
# Create context
|
16
16
|
context = ::Nanoc3::Context.new(assigns)
|
17
17
|
|
18
|
+
# Get binding
|
19
|
+
proc = assigns[:content] ? lambda { assigns[:content] } : nil
|
20
|
+
assigns_binding = context.get_binding(&proc)
|
21
|
+
|
18
22
|
# Get result
|
19
|
-
::Erubis::Eruby.new(content, :filename => filename).result(
|
23
|
+
::Erubis::Eruby.new(content, :filename => filename).result(assigns_binding)
|
20
24
|
end
|
21
25
|
|
22
26
|
end
|
data/lib/nanoc3/filters/haml.rb
CHANGED
@@ -19,7 +19,8 @@ module Nanoc3::Filters
|
|
19
19
|
context = ::Nanoc3::Context.new(assigns)
|
20
20
|
|
21
21
|
# Get result
|
22
|
-
|
22
|
+
proc = assigns[:content] ? lambda { assigns[:content] } : nil
|
23
|
+
::Haml::Engine.new(content, options).render(context, assigns, &proc)
|
23
24
|
end
|
24
25
|
|
25
26
|
end
|
data/lib/nanoc3/filters/sass.rb
CHANGED
@@ -46,10 +46,7 @@ module Nanoc3::Filters
|
|
46
46
|
# Get import paths
|
47
47
|
import_paths = (options[:load_paths] || []).dup
|
48
48
|
import_paths.unshift(File.dirname(sass_filename)) if sass_filename
|
49
|
-
|
50
|
-
imported_filenames = imported_nodes.map do |node|
|
51
|
-
::Sass::Files.find_file_to_import(node.imported_filename, import_paths)
|
52
|
-
end
|
49
|
+
imported_filenames = imported_nodes.map { |node| node.imported_filename }
|
53
50
|
|
54
51
|
# Convert to items
|
55
52
|
imported_items = imported_filenames.map do |filename|
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 3
|
8
|
-
- 1
|
9
|
-
- 6
|
10
|
-
version: 3.1.6
|
4
|
+
prerelease:
|
5
|
+
version: 3.1.7
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Denis Defreyne
|
@@ -15,7 +10,7 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date:
|
13
|
+
date: 2011-05-03 00:00:00 +02:00
|
19
14
|
default_executable: nanoc3
|
20
15
|
dependencies:
|
21
16
|
- !ruby/object:Gem::Dependency
|
@@ -26,11 +21,6 @@ dependencies:
|
|
26
21
|
requirements:
|
27
22
|
- - ">="
|
28
23
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 23
|
30
|
-
segments:
|
31
|
-
- 1
|
32
|
-
- 0
|
33
|
-
- 0
|
34
24
|
version: 1.0.0
|
35
25
|
type: :runtime
|
36
26
|
version_requirements: *id001
|
@@ -179,23 +169,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
169
|
requirements:
|
180
170
|
- - ">="
|
181
171
|
- !ruby/object:Gem::Version
|
182
|
-
hash: 3
|
183
|
-
segments:
|
184
|
-
- 0
|
185
172
|
version: "0"
|
186
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
174
|
none: false
|
188
175
|
requirements:
|
189
176
|
- - ">="
|
190
177
|
- !ruby/object:Gem::Version
|
191
|
-
hash: 3
|
192
|
-
segments:
|
193
|
-
- 0
|
194
178
|
version: "0"
|
195
179
|
requirements: []
|
196
180
|
|
197
181
|
rubyforge_project:
|
198
|
-
rubygems_version: 1.
|
182
|
+
rubygems_version: 1.5.0
|
199
183
|
signing_key:
|
200
184
|
specification_version: 3
|
201
185
|
summary: a web publishing system written in Ruby for building small to medium-sized websites.
|