kslides¶
kslides is a Kotlin DSL for the reveal.js presentation framework. Author your slides in Markdown, raw HTML, or the type-safe kotlinx.html DSL, and ship them as a static site or live Ktor server.
Why kslides?¶
- One source, two output modes — render to static HTML for Netlify or GitHub Pages, or serve dynamic content over HTTP with Ktor.
- Mix authoring styles — Markdown for prose, raw HTML for fine control, the Kotlin DSL for anything generated.
- Hierarchical configuration — set defaults globally, override per presentation, and tweak per slide.
- Live reload while authoring — with dev mode, the browser follows your edits and lands you back on the slide you were working on.
- Batteries included — embedded reveal.js, offline Mermaid diagrams, Kotlin Playground iframes, Kroki diagrams, and Lets-Plot charts.
A taste¶
fun main() {
kslides {
presentation {
markdownSlide {
content {
"""
# Hello, kslides!
A Kotlin DSL for reveal.js.
"""
}
}
}
}
}
That's a complete kslides program. Run main(), open docs/index.html, and you've got a slide deck.
To skip the setup entirely, scaffold a ready-to-run project:
curl -fsSL https://raw.githubusercontent.com/kslides/kslides/master/kslides-init.sh | bash -s -- my-talk --title "My Talk"
Where to next?¶
- Installation — scaffold a project, or add kslides to an existing Gradle build.
- Quickstart — build your first deck end-to-end.
- Slides — Markdown, HTML, and DSL slide types.
- Configuration — the global → presentation → slide cascade.
- Output modes — static site, Ktor server, and live-reload dev mode.
- Styling — themes, custom CSS, and slide/code font sizes.
- KDocs — Dokka-generated API reference.