Sha256: 7193fc5bf330b3fc1fb715b503a5fdaa4a59780973b2ab895a5584c31792d7d4

Contents?: true

Size: 435 Bytes

Versions: 19

Compression:

Stored size: 435 Bytes

Contents

module Jekyll
  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')

        context.registers[:site].config['citeproc'].render :bibliography, id: context.registers[:page]['citekey']
      end
    end
  end
end

Liquid::Template.register_tag('reference', Jekyll::Zettel::Reference)

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
jekyll-zettel-0.6.10 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.6.9 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.6.8 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.6.7 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.6.5 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.6.4 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.6.3 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.6.2 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.6.1 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.6.0 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.5.3 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.5.2 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.5.0 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.4.3 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.4.2 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.4.1 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.4.0 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.3.0 lib/jekyll/zettel/reference.rb
jekyll-zettel-0.2.0 lib/jekyll/zettel/reference.rb