Dev Docs: Attempt To Fix Site Build Error On ntpd1.template

Reported in IRC
This commit is contained in:
David A. Harding 2015-02-25 07:59:01 -05:00
parent 3640939d5b
commit 84f5b6f160
No known key found for this signature in database
GPG key ID: 4B29C30FF29EC4B7

View file

@ -23,8 +23,11 @@ require 'yaml'
def render(context)
output = super
## Workaround for inconsistent relative directory
path = File.expand_path(File.dirname(__FILE__)) + "/../"
data = YAML.load(output)
template = File.open(@template_name, mode="r")
template = File.open(path + @template_name, mode="r")
@mytemplate = Liquid::Template.parse(template.read())
@mytemplate.render('entry' => data)
end