Docs * asciidoc-kmp v0.1
Getting started
A short guide to installing and reading with asciidoc-kmp.
§ 1
Install
Add the dependency in your build.gradle.kts:
repositories {
mavenCentral()
}
dependencies {
implementation("dev.markup-poets:asciidoc-kmp:0.1.0")
}asciidoc-kmp targets JVM, Android, iOS, and Kotlin/JS from a single source set.
§ 2
Parse a document
import dev.markuppoets.asciidoc.Asciidoc
val source = """
= Structure is a form of verse
Markup Poets
Consider the paragraph as a breath.
""".trimIndent()
val doc = Asciidoc.parse(source)
println(doc.title) // Structure is a form of verse
println(doc.author) // Markup Poets
§ 3
Render to HTML
val html = doc.renderHtml()
writeFile("out.html", html)Rendering is intentionally minimal in v0.1 — a small, readable HTML output you can style with a stylesheet you actually understand.
§ 4
Status
v0.1 supports document titles, authors, paragraphs, lists, code blocks, block quotes, inline emphasis, and links. Tables, admonitions, and includes are on the roadmap.
The project is early. Bug reports and edge cases are the most welcome form of contribution.