ThemePostRendererResource

A PostRendererResource that bundles CSS theme components and their sibling assets (fonts, images) for styling the HTML output.

Themes are read from themeLayout, an InstallLayout.Html.Themes node populated by the assembleThemes Gradle task. In a Quarkdown distribution it ends up under lib/html/theme/.

Expected layout:

<themeDirectory>/
global.css
layout/<name>/<name>.css (+ exported font/asset subfolders)
color/<name>/<name>.css
locale/<tag>/<tag>.css (+ optional exported assets, e.g. CJK fonts)

Active components include global styles (always), the selected layout and color themes, and the locale-specific stylesheet if one exists (e.g. CJK typefaces, #105). Each component may carry sibling assets next to its CSS, and a generated theme.css manifest imports them all via nested paths that mirror the output directory layout.

If themeLayout is null or does not exist, no theme resources are emitted; this keeps theme-independent tests easy to construct.

Parameters

theme

the document theme specifying color and layout preferences

locale

the optional locale for locale-specific styling

themeLayout

the install layout node for the theme/ directory

Constructors

Link copied to clipboard
constructor(theme: DocumentTheme, locale: Locale?, themeLayout: InstallLayout.Html.Themes?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Whether this resource should be included in the output during live preview.

Functions

Link copied to clipboard
open override fun includeTo(resources: MutableSet<OutputResource>, rendered: CharSequence)

Collects resources and adds them to the output set.