top

Asciidocgo implements an AsciiDoc renderer in Go.

Methods for parsing Asciidoc input files and rendering documents using eRuby templates.

Asciidoc documents comprise a header followed by zero or more sections. Sections are composed of blocks of content. For example:

= Doc Title

== Section 1

This is a paragraph block in the first section.

== Section 2

This section has a paragraph block and an olist block.

. Item 1
. Item 2

Examples:

Use built-in templates:

lines = File.readlines("your_file.asc")
doc = Asciidoctor::Document.new(lines)
html = doc.render
File.open("your_file.html", "w+") do |file|
  file.puts html
end

Use custom (Tilt-supported) templates:

lines = File.readlines("your_file.asc")
doc = Asciidoctor::Document.new(lines, :template_dir => 'templates')
html = doc.render
File.open("your_file.html", "w+") do |file|
  file.puts html
end

Imports 8 package(s)

  1. github.com/ciarand/asciidocgo/consts/regexps/quotes
  2. github.com/ciarand/asciidocgo/debug
  3. github.com/ciarand/asciidocgo/consts/regexps
  4. github.com/ciarand/asciidocgo/consts/safemode
  5. github.com/smartystreets/goconvey/convey
  6. github.com/ciarand/asciidocgo/consts/contentModel
  7. github.com/ciarand/asciidocgo/consts/context
  8. github.com/ciarand/asciidocgo/consts/compliance

Test imports 2 package(s)

  1. github.com/onsi/gomega
  2. github.com/onsi/ginkgo