slideDefinition

fun slideDefinition(source: String, token: String, title: String = "Slide Definition", highlightPattern: String = "[]", id: String = "", language: String = "kotlin")

Generate a Markdown "meta" slide that embeds a highlighted code excerpt from source between // <token> begin and // <token> end markers, and appends a "GitHub Source" link pointing at the same region on master. Primarily used by the kslides example deck to explain its own DSL.

Parameters

source

path (relative to the repo root) of the source file to excerpt.

token

the begin/end token bracketing the excerpt.

title

heading shown above the code block.

highlightPattern

reveal.js data-line-numbers pattern (e.g. "1-3|5").

id

optional slide id.

language

syntax-highlighting language for the code fence.


fun VerticalSlidesContext.slideDefinition(source: String, token: String, title: String = "Slide Definition", highlightPattern: String = "[]", id: String = "", language: String = "kotlin")

Vertical-stack variant of slideDefinition. Identical semantics but registers the generated Markdown slide inside the enclosing VerticalSlidesContext.