lib/jekyll/zettel/reference.rb in jekyll-zettel-0.6.10 vs lib/jekyll/zettel/reference.rb in jekyll-zettel-0.7.0
- old
+ new
@@ -2,12 +2,13 @@
module Zettel
# Liquid tag that renders the reference the Zettel is based on
class Reference < Liquid::Tag
def render(context)
- return unless context.registers[:page].key?('citekey')
+ doc = context.registers[:page]
+ return unless doc.key?('reference') && doc['reference'].key?('citation-key')
- context.registers[:site].config['citeproc'].render :bibliography, id: context.registers[:page]['citekey']
+ context.registers[:site].config['citeproc'].render :bibliography, id: doc['reference']['citation-key']
end
end
end
end