Markup Poet AsciiDoc Converter
A lightweight AsciiDoc converter library built with Kotlin Multiplatform. The core parser has zero external dependencies and runs on JVM, Android, iOS, Linux, and macOS.
|
This project aims for compatibility with the official AsciiDoc Language Specification, tracked via its Technology Compatibility Kit (TCK): 13 of 13 published TCK tests pass against commit |
Pipeline
The library is a clean three-stage pipeline — Parse → Process → Render — with a single document model end to end: the ASG (Abstract Semantic Graph), which mirrors the official AsciiDoc schema. See the architecture explanation for how the stages fit together.
Quick start
Parse an AsciiDoc string and render it to HTML:
import org.markup.poet.asciidoc.parser.DefaultAsciidocParser
import org.markup.poet.asciidoc.render.*
val document = DefaultAsciidocParser().parse(asciidocSource).document
val builder = DefaultHtmlBuilder(DefaultHtmlEscaper())
val inlineRenderer = DefaultInlineRenderer(builder)
val renderer = DefaultHtmlRenderer(DefaultBlockRenderer(builder, inlineRenderer), inlineRenderer)
renderer.render(document).onSuccess { html -> println(html) }
For a step-by-step walkthrough including dependencies and theming, follow the getting started tutorial.
Features
-
Broad syntax coverage — sections, lists, tables, admonitions, includes, conditionals, cross-references, footnotes, and rich inline formatting; see TCK status and syntax coverage (13/13 published TCK tests passing)
-
WASM plugins — custom blocks, block macros, inline macros, and converter plugins via sandboxed WebAssembly; see Write a WASM plugin
-
Pluggable theming — built-in themes, CSS variable overrides, and custom themes; see Customize themes and CSS
-
CLI tools — AsciiDoc to HTML conversion from the command line, on the JVM or as a native binary; see the CLI tutorial
-
Platforms — JVM (Java 11), Android (API 24), iOS (x64, ARM64, Simulator ARM64), Linux (x64), macOS (ARM64)
Coordinates
Artifacts are published to Maven Central under the org.markup-poet group:
dependencies {
implementation("org.markup-poet:asciidoc-parser:0.1.0") // parser + ASG model (zero deps)
implementation("org.markup-poet:document-processing:0.1.0") // includes, conditionals, TOC, xrefs
implementation("org.markup-poet:html-renderer:0.1.0") // HTML output with theming
}
See Modules and coordinates for the full module list.
This converter is one member of the Markup Poet family; the DSL poet documentation covers the Kotlin DSL side of the project.
Where to go next
-
Tutorials — learn by doing: use the library or convert a document with the CLI
-
How-to guides — solve a specific task: theming, plugins, native binaries, multi-file assembly
-
Reference — exact APIs and options: parser API, rendering configuration, plugin ABI
-
Explanation — the reasoning behind the design: architecture, why WASM plugins, theming
-
Contributing — how to contribute, including the TCK workflow; source at GitHub