Gemsmith now accepts template: None
This commit is contained in:
parent
6fba7b0cc2
commit
9b1250fcf1
|
@ -195,7 +195,9 @@ module GemSmith
|
|||
}
|
||||
|
||||
apply { |f|
|
||||
template = f.fetch(:template, default_template)
|
||||
template = f.fetch(:template){ f.fetch("template", default_template) }
|
||||
p [template, f[:out_path], f.keys]
|
||||
if template != "None"
|
||||
f[:dependencies].push(template)
|
||||
f[:stream].transform_all { |body|
|
||||
b = binding()
|
||||
|
@ -203,6 +205,7 @@ module GemSmith
|
|||
$gemsmith[:now_rendering] = File.join(f[:rel_dir], File.basename(f[:out_path]))
|
||||
erb[template].result(b)
|
||||
}
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
----
|
||||
---
|
||||
template: None
|
||||
----
|
||||
---
|
||||
|
||||
This is a test.
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
|
||||
<%
|
||||
name = if defined? name then name else "A Mysterious Stranger" end
|
||||
%>
|
||||
<div class="person">
|
||||
<% if defined? pic %>
|
||||
<img class="photo" src="<%=pic%>" width="<%=pic_w%>" height="<%=pic_h%>" />
|
||||
|
|
Loading…
Reference in a new issue