Class: Giblish::HtmlConverter

Inherits:
DocConverter show all
Defined in:
lib/giblish/docconverter.rb

Overview

Converts asciidoc files to html5 output.

Constant Summary

Constants inherited from DocConverter

DocConverter::COMMON_CONVERTER_OPTS, DocConverter::DEFAULT_ATTRIBUTES

Instance Attribute Summary

Attributes inherited from DocConverter

#converter_options, #paths

Instance Method Summary collapse

Methods inherited from DocConverter

#convert, #convert_str

Constructor Details

#initialize(paths, deployment_info, options) ⇒ HtmlConverter

Returns a new instance of HtmlConverter.



167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/giblish/docconverter.rb', line 167

def initialize(paths, deployment_info, options)
  super paths, deployment_info, options

  # validate that things are ok on the resource front
  # and copy if needed
  @dst_asset_dir = @paths.dst_root_abs.join("web_assets")
  validate_and_copy_resources @dst_asset_dir

  # identify ourselves as an html converter
  add_backend_options({ backend: "html5", fileext: "html" })
  # setup the attributes specific for this converter
  add_backend_attributes(common_attributes)
end