Sha256: 7c7f82efd599d71f8074de43ec0fad177a99fa23abbe7103b35a71df0c6b113b

Contents?: true

Size: 813 Bytes

Versions: 49

Compression:

Stored size: 813 Bytes

Contents

require 'tilt/template'

# AsciiDoc see: http://asciidoc.org/
module Tilt
  # Asciidoctor implementation for AsciiDoc see:
  # http://asciidoctor.github.com/
  #
  # Asciidoctor is an open source, pure-Ruby processor for
  # converting AsciiDoc documents or strings into HTML 5,
  # DocBook 4.5 and other formats.
  class AsciidoctorTemplate < Template
    self.default_mime_type = 'text/html'

    def self.engine_initialized?
      defined? ::Asciidoctor::Document
    end

    def initialize_engine
      require_template_library 'asciidoctor'
    end

    def prepare
      options[:header_footer] = false if options[:header_footer].nil?
    end

    def evaluate(scope, locals, &block)
      @output ||= Asciidoctor.render(data, options, &block)
    end

    def allows_script?
      false
    end
  end
end

Version data entries

49 entries across 42 versions & 11 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/tilt-1.4.1/lib/tilt/asciidoc.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/tilt-1.4.1/lib/tilt/asciidoc.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/tilt-1.4.1/lib/tilt/asciidoc.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/tilt-1.4.1/lib/tilt/asciidoc.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-1.0.5 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-1.0.4 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-1.0.3 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-1.0.3.pre lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-1.0.2 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-1.0.1 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-1.0.0 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-0.5.5 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-0.5.5.pre lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-0.5.4 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-0.5.3 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-0.5.2 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
scout_realtime-0.5.1 lib/vendor/tilt-1.4.1/lib/tilt/asciidoc.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/tilt-1.4.1/lib/tilt/asciidoc.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/asciidoc.rb