diff options
Diffstat (limited to 'plugins/jekyll')
2 files changed, 16 insertions, 12 deletions
diff --git a/plugins/jekyll/jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt b/plugins/jekyll/jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt index 81293ef2..c5bcd67b 100644 --- a/plugins/jekyll/jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt +++ b/plugins/jekyll/jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt @@ -8,12 +8,14 @@ import org.jetbrains.dokka.allModulesPage.AllModulesPagePlugin import org.jetbrains.dokka.allModulesPage.MultimoduleLocationProvider import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.resolvers.local.DokkaLocationProviderFactory +import org.jetbrains.dokka.base.resolvers.local.LocationProviderFactory import org.jetbrains.dokka.jekyll.JekyllPlugin import org.jetbrains.dokka.plugability.DokkaPlugin import org.jetbrains.dokka.plugability.DokkaPluginApiPreview +import org.jetbrains.dokka.plugability.Extension import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement -class JekyllTemplateProcessingPlugin : DokkaPlugin() { +public class JekyllTemplateProcessingPlugin : DokkaPlugin() { private val allModulesPagePlugin by lazy { plugin<AllModulesPagePlugin>() } @@ -22,14 +24,14 @@ class JekyllTemplateProcessingPlugin : DokkaPlugin() { private val dokkaBase by lazy { plugin<DokkaBase>() } - val jekyllLocationProvider by extending { + public val jekyllLocationProvider: Extension<LocationProviderFactory, *, *> by extending { dokkaBase.locationProviderFactory providing MultimoduleLocationProvider::Factory override listOf( jekyllPlugin.locationProvider, gfmTemplatingPlugin.gfmLocationProvider ) } - val jekyllPartialLocationProvider by extending { + public val jekyllPartialLocationProvider: Extension<LocationProviderFactory, *, *> by extending { allModulesPagePlugin.partialLocationProviderFactory providing ::DokkaLocationProviderFactory override listOf( allModulesPagePlugin.baseLocationProviderFactory, gfmTemplatingPlugin.gfmPartialLocationProvider 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<PageTransformer>() + public val jekyllPreprocessors: ExtensionPoint<PageTransformer> by extensionPoint<PageTransformer>() private val dokkaBase by lazy { plugin<DokkaBase>() } private val gfmPlugin by lazy { plugin<GfmPlugin>() } - val renderer by extending { + public val renderer: Extension<Renderer, *, *> by extending { (CoreExtensions.renderer providing { JekyllRenderer(it) } override plugin<GfmPlugin>().renderer) } - val rootCreator by extending { + public val rootCreator: Extension<PageTransformer, *, *> by extending { jekyllPreprocessors with RootCreator } - val briefCommentPreprocessor by extending { + public val briefCommentPreprocessor: Extension<PageTransformer, *, *> by extending { jekyllPreprocessors with BriefCommentPreprocessor() } - val packageListCreator by extending { + public val packageListCreator: Extension<PageTransformer, *, *> by extending { jekyllPreprocessors providing { PackageListCreator(it, RecognizedLinkFormat.DokkaJekyll) } order { after(rootCreator) } } - val locationProvider by extending { + public val locationProvider: Extension<LocationProviderFactory, *, *> 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<JekyllPlugin>().query { jekyllPreprocessors } + override val preprocessors: List<PageTransformer> = context.plugin<JekyllPlugin>().query { jekyllPreprocessors } override fun buildPage(page: ContentPage, content: (StringBuilder, ContentPage) -> Unit): String { val builder = StringBuilder() |