Commit 3d6e9866 authored by Sylvester Keil's avatar Sylvester Keil

improved cite details tag

parent 50b1e2d6
...@@ -10,13 +10,12 @@ module Jekyll ...@@ -10,13 +10,12 @@ module Jekyll
super super
@config = Scholar.defaults.dup @config = Scholar.defaults.dup
@key = arguments.strip.split(/\s+/, 2)[0] @key, @text = arguments.strip.split(/\s+/, 2)
@text = arguments.strip.split(/\s+/, 2)[1]
end end
def render(context) def render(context)
set_context_to context set_context_to context
cite_details key, text || config['details_link'] cite_details key, text
end end
end end
......
...@@ -81,10 +81,8 @@ module Jekyll ...@@ -81,10 +81,8 @@ module Jekyll
end end
def cite_details(key, text) def cite_details(key, text)
entry = bibliography[key]
if bibliography.key?(key) if bibliography.key?(key)
link_to details_link_for(entry), text link_to details_link_for(bibliography[key]), text || config['details_link']
else else
"(missing reference)" "(missing reference)"
end end
......
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