Sha256: 54eec0feb54689a42b38b06ebdd10baa563fb7c14c91b7cc7db0010e67d4f996

Contents?: true

Size: 439 Bytes

Versions: 9

Compression:

Stored size: 439 Bytes

Contents

# For plugin authors who need to generate urls pointing to ther doc pages.

module Octopress
  module Docs
    class DocUrlTag < Liquid::Tag
      def initialize(tag_name, markup, tokens)
        super
        @url = markup.strip
      end

      def render(context)
        '/' + File.join(context['page']['plugin']['docs_base_url'], @url)
      end
    end
  end
end

Liquid::Template.register_tag('doc_url', Octopress::Docs::DocUrlTag)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
octopress-docs-0.0.9 lib/octopress-docs/tag.rb
octopress-docs-0.0.8 lib/octopress-docs/tag.rb
octopress-docs-0.0.7 lib/octopress-docs/tag.rb
octopress-docs-0.0.6 lib/octopress-docs/tag.rb
octopress-docs-0.0.5 lib/octopress-docs/tag.rb
octopress-docs-0.0.4 lib/octopress-docs/tag.rb
octopress-docs-0.0.3 lib/octopress-docs/tag.rb
octopress-docs-0.0.2 lib/octopress-docs/tag.rb
octopress-docs-0.0.1 lib/octopress-docs/tag.rb