Commit a16224df authored by Hendrik van Antwerpen's avatar Hendrik van Antwerpen

Expose extra data to details page.

parent a7753664
......@@ -15,7 +15,7 @@ module Jekyll
process(@name)
read_yaml(File.join(base, '_layouts'), config['details_layout'])
data['entry'] = liquidify(entry)
data.merge!(reference_data(entry))
end
end
......
......@@ -272,16 +272,22 @@ module Jekyll
def bibliography_tag(entry, index)
return missing_reference unless entry
liquid_template.render({
liquid_template.render(
reference_data(entry,index).merge({
'index' => index,
'details' => details_link_for(entry)
}))
end
def reference_data(entry, index = nil)
{
'entry' => liquidify(entry),
'reference' => reference_tag(entry, index),
'key' => entry.key,
'type' => entry.type.to_s,
'link' => repository_link_for(entry),
'links' => repository_links_for(entry),
'index' => index,
'details' => details_link_for(entry)
})
'links' => repository_links_for(entry)
}
end
def liquidify(entry)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment