ExportBlock

abstract class ExportBlock @Inject constructor(kobwebFolder: KobwebFolder)(source)

A sub-block for defining properties related to configuring the kobweb export step.

Constructors

Link copied to clipboard
@Inject
constructor(kobwebFolder: KobwebFolder)

Types

Link copied to clipboard
class ExportFilterContext(val route: String)
Link copied to clipboard
class TraceConfig(val root: Path, val filter: (String) -> Boolean, val includeScreenshots: Boolean)

Configuration values for taking a trace at the export step.

Properties

Link copied to clipboard
abstract val browser: Property<Browser>

Which browser to use for the export step.

Link copied to clipboard

A filter which, if set, will be invoked for every page to test if it should be exported.

Link copied to clipboard
abstract val includeSourceMap: Property<Boolean>

Whether to include a source map when exporting your site.

Link copied to clipboard
abstract val suppressNoRootWarning: Property<Boolean>

If true, hide the warning shown the projects that don't define a root route.

Link copied to clipboard
abstract val timeout: Property<Duration>

The max timeout to allow for each export.

Functions

Link copied to clipboard
fun addExtraRoute(route: String, exportPath: String? = null)

Add a route to export on top of what's normally discovered.

Link copied to clipboard
fun enableTraces(tracesRoot: Path = kobwebFolder.path.resolve("export-traces"), filter: (String) -> Boolean = { true }, showScreenshots: Boolean = true)

Enable traces for your export.