Class: Coradoc::Html::Static

Inherits:
ConverterBase show all
Defined in:
lib/coradoc/html/static.rb

Overview

Static HTML converter

Converts CoreModel documents to static HTML5 output using the unified Liquid template pipeline.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary

Attributes inherited from ConverterBase

#config, #document

Instance Method Summary collapse

Methods inherited from ConverterBase

convert, #initialize, #to_file, to_file

Constructor Details

This class inherits a constructor from Coradoc::Html::ConverterBase

Instance Method Details

#convertObject



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/coradoc/html/static.rb', line 56

def convert
  renderer = Renderer.new(template_dirs: @config.template_dirs)

  if @config.embedded
    renderer.render(@document)
  else
    renderer.render_html5(
      @document,
      layout: :static,
      lang: @config.lang,
      author: @config.meta_tags[:author],
      description: @config.meta_tags[:description],
      custom_css: @config.custom_css,
      toc: @config.include_toc,
      section_numbers: @config.section_numbering,
      section_number_levels: @config.section_numbering_levels,
      toc_levels: @config.toc_levels
    )
  end
end