HtmlDocumentBuilder

class HtmlDocumentBuilder(context: Context, relativePathToRoot: String, sidebarContent: CharSequence)

Builds a full HTML document wrapping the rendered content, replacing the old template-based approach. Uses kotlinx.html DSL to programmatically construct the document structure.

Parameters

context

the rendering context containing document metadata, attributes, and configuration

relativePathToRoot

the relative path from the current document to the root directory, used to correctly reference shared resources (scripts, themes, etc.)

sidebarContent

the pre-rendered sidebar HTML content (table of contents)

Constructors

Link copied to clipboard
constructor(context: Context, relativePathToRoot: String, sidebarContent: CharSequence)

Functions

Link copied to clipboard

Builds the full HTML document wrapping the given content.