MarkdownBlock

abstract class MarkdownBlock(    providers: ProviderFactory,     objects: ObjectFactory,     baseGenDir: Provider<String>,     pagesPackage: Property<String>) : KobwebBlock.FileGeneratingBlock(source)

Constructors

Link copied to clipboard
constructor(providers: ProviderFactory, objects: ObjectFactory, baseGenDir: Provider<String>, pagesPackage: Property<String>)

Types

Link copied to clipboard

Properties

Link copied to clipboard
abstract val defaultPackage: Property<String>

The default package that source code generated from Markdown files will be written under.

Link copied to clipboard
abstract val defaultRoot: Property<String>

The root composable to use as a fallback if no other root is provided.

Link copied to clipboard
abstract val genDir: Property<String>
Link copied to clipboard
abstract val imports: ListProperty<String>

A list of imports that should be added to the top of every generated markdown file.

Link copied to clipboard
abstract val markdownPath: Property<String>

The path under which all markdown resources will live.

Link copied to clipboard

Register a handler which will be triggered with a list of all markdown pages in this project.

Functions

Link copied to clipboard
fun addSource(dir: Directory, targetPackage: String? = null)
fun addSource(dirProvider: Provider<Directory>, targetPackage: String? = null)
fun addSource(dirProvider: Provider<Directory>, targetPackage: Provider<String>)
fun addSource(taskProvider: TaskProvider<*>, targetPackage: String? = null)

fun addSource(dir: Directory, targetPackage: Provider<String>)

Adds a directory under which to search for markdown files.

fun addSource(taskProvider: TaskProvider<*>, targetPackage: Provider<String>)

Hooks up a task's output files as directories under which to search for additional markdown files.

Link copied to clipboard
@Internal
abstract fun getExtensions(): ExtensionContainer