Sha256: 35e3d3f72313063a238bb0fc53a8cc120bff8cc908a93d2f00ac752f54632812

Contents?: true

Size: 589 Bytes

Versions: 1

Compression:

Stored size: 589 Bytes

Contents

# Inspired by jekyll-contentblocks https://github.com/rustygeldmacher/jekyll-contentblocks
#
module Octopress
  module Tags
    class YieldTag < Liquid::Tag
      def initialize(tag_name, markup, tokens)
        super
        @block_name = Helpers::ContentFor.get_block_name(tag_name, markup)
      end

      def render(context)
        content = Helpers::ContentFor.render(context, @block_name)
        if @block_name == 'head'
          content.insert 0, "<meta name='generator' content='Octopress #{Octopress::Ink::VERSION}'>\n"
        end
        content
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octopress-ink-1.0.0.alpha.19 lib/octopress-ink/tags/yield.rb