From 02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Thu, 31 Aug 2023 20:16:01 +0200 Subject: Enable explicit API mode (#3139) --- plugins/jekyll/src/main/kotlin/JekyllPlugin.kt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'plugins/jekyll/src/main/kotlin/JekyllPlugin.kt') diff --git a/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt b/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt index 0fe43a48..733c81bb 100644 --- a/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt +++ b/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt @@ -9,6 +9,7 @@ import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.renderers.PackageListCreator import org.jetbrains.dokka.base.renderers.RootCreator import org.jetbrains.dokka.base.resolvers.local.DokkaLocationProviderFactory +import org.jetbrains.dokka.base.resolvers.local.LocationProviderFactory import org.jetbrains.dokka.base.resolvers.shared.RecognizedLinkFormat import org.jetbrains.dokka.gfm.GfmPlugin import org.jetbrains.dokka.gfm.renderer.BriefCommentPreprocessor @@ -16,37 +17,38 @@ import org.jetbrains.dokka.gfm.renderer.CommonmarkRenderer import org.jetbrains.dokka.pages.ContentPage import org.jetbrains.dokka.plugability.* import org.jetbrains.dokka.renderers.PostAction +import org.jetbrains.dokka.renderers.Renderer import org.jetbrains.dokka.transformers.pages.PageTransformer -class JekyllPlugin : DokkaPlugin() { +public class JekyllPlugin : DokkaPlugin() { - val jekyllPreprocessors by extensionPoint() + public val jekyllPreprocessors: ExtensionPoint by extensionPoint() private val dokkaBase by lazy { plugin() } private val gfmPlugin by lazy { plugin() } - val renderer by extending { + public val renderer: Extension by extending { (CoreExtensions.renderer providing { JekyllRenderer(it) } override plugin().renderer) } - val rootCreator by extending { + public val rootCreator: Extension by extending { jekyllPreprocessors with RootCreator } - val briefCommentPreprocessor by extending { + public val briefCommentPreprocessor: Extension by extending { jekyllPreprocessors with BriefCommentPreprocessor() } - val packageListCreator by extending { + public val packageListCreator: Extension by extending { jekyllPreprocessors providing { PackageListCreator(it, RecognizedLinkFormat.DokkaJekyll) } order { after(rootCreator) } } - val locationProvider by extending { + public val locationProvider: Extension by extending { dokkaBase.locationProviderFactory providing ::DokkaLocationProviderFactory override listOf(gfmPlugin.locationProvider) } @@ -66,11 +68,11 @@ class JekyllPlugin : DokkaPlugin() { PluginApiPreviewAcknowledgement } -class JekyllRenderer( +public class JekyllRenderer( context: DokkaContext ) : CommonmarkRenderer(context) { - override val preprocessors = context.plugin().query { jekyllPreprocessors } + override val preprocessors: List = context.plugin().query { jekyllPreprocessors } override fun buildPage(page: ContentPage, content: (StringBuilder, ContentPage) -> Unit): String { val builder = StringBuilder() -- cgit