
DSL wrapper simplifies creating and managing presentations using Reveal JS. Enables running, bundling, rendering to PDF, and initializing new presentations from templates with ease.
Kotlin DSL wrapper around Reveal JS presentation library
Run server with presentation:
jbang revealkt@limebeck.dev run ./MyAwesomePresentation.reveal.ktsBundle presentation to static html site:
jbang revealkt@limebeck.dev bundle ./MyAwesomePresentation.reveal.ktsRender presentation to pdf via playwright:
jbang revealkt@limebeck.dev pdf ./MyAwesomePresentation.reveal.kts -o myPresentation.pdf[!CAUTION] For now playwright requires to download chromium first (uses npm)
Playwright documentation: https://playwright.dev/java/docs/browsers
jbang revealkt@limebeck.dev chrome installUninstall chrome
jbang revealkt@limebeck.dev chrome uninstallCreate new presentation from template
jbang revealkt@limebeck.dev init my-awesome-presentation
cd ./my-awesome-presentation
jbang revealkt@limebeck.dev run ./presentation/my-awesome-presentation.reveal.ktsjbang app install revealkt@limebeck.dev
revealkt run ./presentation/my-awesome-presentation.reveal.ktsMyAwesomeScript.reveal.kts:
import qrcode.color.Colors
title = "My awesome presentation"
configuration {
controls = false
progress = false
}
slides {
regularSlide {
autoanimate = true
+title { "Hello from my awesome presentation" }
}
regularSlide {
autoanimate = true
+qrCode("https://github.com/LimeBeck/reveal-kt") {
stretch = true
transformBuilder {
val logo = loadAsset("logo2.png")
it.withSize(20).withColor(Colors.css("#B125EA")).withLogo(logo, 150, 150, clearLogoArea = true)
}
}
}
verticalSlide {
val title = Title { "Some text" }
slide {
autoanimate = true
+title
+note {
"Some note"
}
}
slide {
autoanimate = true
+title
+title { "Updated text" }
+note {
"Some note"
}
}
slide {
autoanimate = true
+title
+code {
//language=JSON
"""
{
"string": "some string"
}
""".trimIndent()
}
}
slide {
+img(src = "image.png") {
stretch = true
}
}
}
}Kotlin DSL wrapper around Reveal JS presentation library
Run server with presentation:
jbang revealkt@limebeck.dev run ./MyAwesomePresentation.reveal.ktsBundle presentation to static html site:
jbang revealkt@limebeck.dev bundle ./MyAwesomePresentation.reveal.ktsRender presentation to pdf via playwright:
jbang revealkt@limebeck.dev pdf ./MyAwesomePresentation.reveal.kts -o myPresentation.pdf[!CAUTION] For now playwright requires to download chromium first (uses npm)
Playwright documentation: https://playwright.dev/java/docs/browsers
jbang revealkt@limebeck.dev chrome installUninstall chrome
jbang revealkt@limebeck.dev chrome uninstallCreate new presentation from template
jbang revealkt@limebeck.dev init my-awesome-presentation
cd ./my-awesome-presentation
jbang revealkt@limebeck.dev run ./presentation/my-awesome-presentation.reveal.ktsjbang app install revealkt@limebeck.dev
revealkt run ./presentation/my-awesome-presentation.reveal.ktsMyAwesomeScript.reveal.kts:
import qrcode.color.Colors
title = "My awesome presentation"
configuration {
controls = false
progress = false
}
slides {
regularSlide {
autoanimate = true
+title { "Hello from my awesome presentation" }
}
regularSlide {
autoanimate = true
+qrCode("https://github.com/LimeBeck/reveal-kt") {
stretch = true
transformBuilder {
val logo = loadAsset("logo2.png")
it.withSize(20).withColor(Colors.css("#B125EA")).withLogo(logo, 150, 150, clearLogoArea = true)
}
}
}
verticalSlide {
val title = Title { "Some text" }
slide {
autoanimate = true
+title
+note {
"Some note"
}
}
slide {
autoanimate = true
+title
+title { "Updated text" }
+note {
"Some note"
}
}
slide {
autoanimate = true
+title
+code {
//language=JSON
"""
{
"string": "some string"
}
""".trimIndent()
}
}
slide {
+img(src = "image.png") {
stretch = true
}
}
}
}