diff options
Diffstat (limited to 'plugins/jekyll')
9 files changed, 0 insertions, 235 deletions
diff --git a/plugins/jekyll/README.md b/plugins/jekyll/README.md deleted file mode 100644 index 15ad9071..00000000 --- a/plugins/jekyll/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Jekyll plugin - -The Jekyll plugin adds the ability to generate documentation in `Jekyll Flavoured Markdown` format. It supports both -multi-module and multiplatform projects. - -The Jekyll plugin is shipped together with the Dokka Gradle Plugin, so you can start using it -right away with one of the following tasks: - -* `dokkaJekyll` - generate documentation for a single-project build or one specific module. -* `dokkaJekyllMultiModule` - generate documentation for a multi-module project, assemble it together and - generate navigation page/menu for all the modules. - -To use it with Maven or CLI runners, you have to add it as a dependency. You can find it on -[Maven Central](https://mvnrepository.com/artifact/org.jetbrains.dokka/jekyll-plugin) - -**This plugin is at its early stages**, so you may experience issues and encounter bugs. Feel free to -[report](https://github.com/Kotlin/dokka/issues/new/choose) any errors you see. diff --git a/plugins/jekyll/api/jekyll.api b/plugins/jekyll/api/jekyll.api deleted file mode 100644 index 2d75b214..00000000 --- a/plugins/jekyll/api/jekyll.api +++ /dev/null @@ -1,16 +0,0 @@ -public final class org/jetbrains/dokka/jekyll/JekyllPlugin : org/jetbrains/dokka/plugability/DokkaPlugin { - public fun <init> ()V - public final fun getBriefCommentPreprocessor ()Lorg/jetbrains/dokka/plugability/Extension; - public final fun getJekyllPreprocessors ()Lorg/jetbrains/dokka/plugability/ExtensionPoint; - public final fun getLocationProvider ()Lorg/jetbrains/dokka/plugability/Extension; - public final fun getPackageListCreator ()Lorg/jetbrains/dokka/plugability/Extension; - public final fun getRenderer ()Lorg/jetbrains/dokka/plugability/Extension; - public final fun getRootCreator ()Lorg/jetbrains/dokka/plugability/Extension; -} - -public final class org/jetbrains/dokka/jekyll/JekyllRenderer : org/jetbrains/dokka/gfm/renderer/CommonmarkRenderer { - public fun <init> (Lorg/jetbrains/dokka/plugability/DokkaContext;)V - public fun buildPage (Lorg/jetbrains/dokka/pages/ContentPage;Lkotlin/jvm/functions/Function2;)Ljava/lang/String; - public synthetic fun getPreprocessors ()Ljava/lang/Iterable; -} - diff --git a/plugins/jekyll/build.gradle.kts b/plugins/jekyll/build.gradle.kts deleted file mode 100644 index 8ea5ec00..00000000 --- a/plugins/jekyll/build.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - - implementation(projects.plugins.base) - implementation(projects.plugins.gfm) - - implementation(kotlin("reflect")) - - testImplementation(kotlin("test")) - testImplementation(projects.core.testApi) -} - -registerDokkaArtifactPublication("jekyllPlugin") { - artifactId = "jekyll-plugin" -} diff --git a/plugins/jekyll/jekyll-template-processing/api/jekyll-template-processing.api b/plugins/jekyll/jekyll-template-processing/api/jekyll-template-processing.api deleted file mode 100644 index 482a0d40..00000000 --- a/plugins/jekyll/jekyll-template-processing/api/jekyll-template-processing.api +++ /dev/null @@ -1,6 +0,0 @@ -public final class org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin : org/jetbrains/dokka/plugability/DokkaPlugin { - public fun <init> ()V - public final fun getJekyllLocationProvider ()Lorg/jetbrains/dokka/plugability/Extension; - public final fun getJekyllPartialLocationProvider ()Lorg/jetbrains/dokka/plugability/Extension; -} - diff --git a/plugins/jekyll/jekyll-template-processing/build.gradle.kts b/plugins/jekyll/jekyll-template-processing/build.gradle.kts deleted file mode 100644 index 55f59754..00000000 --- a/plugins/jekyll/jekyll-template-processing/build.gradle.kts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -import org.jetbrains.registerDokkaArtifactPublication - -plugins { - id("org.jetbrains.conventions.kotlin-jvm") - id("org.jetbrains.conventions.maven-publish") -} - -dependencies { - compileOnly(projects.core) - - implementation(projects.plugins.base) - implementation(projects.plugins.jekyll) - implementation(projects.plugins.allModulesPage) - implementation(projects.plugins.templating) - implementation(projects.plugins.gfm) - implementation(projects.plugins.gfm.gfmTemplateProcessing) - - implementation(kotlin("reflect")) - implementation(libs.kotlinx.coroutines.core) - - testImplementation(kotlin("test")) - testImplementation(projects.core.testApi) -} - -registerDokkaArtifactPublication("dokkaJekyllTemplateProcessing") { - artifactId = "jekyll-template-processing-plugin" -} 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 deleted file mode 100644 index c5bcd67b..00000000 --- a/plugins/jekyll/jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.gfm.templateProcessing - -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 - -public class JekyllTemplateProcessingPlugin : DokkaPlugin() { - - private val allModulesPagePlugin by lazy { plugin<AllModulesPagePlugin>() } - - private val jekyllPlugin by lazy { plugin<JekyllPlugin>() } - private val gfmTemplatingPlugin by lazy { plugin<GfmTemplateProcessingPlugin>() } - - private val dokkaBase by lazy { plugin<DokkaBase>() } - - public val jekyllLocationProvider: Extension<LocationProviderFactory, *, *> by extending { - dokkaBase.locationProviderFactory providing MultimoduleLocationProvider::Factory override listOf( - jekyllPlugin.locationProvider, - gfmTemplatingPlugin.gfmLocationProvider - ) - } - - public val jekyllPartialLocationProvider: Extension<LocationProviderFactory, *, *> by extending { - allModulesPagePlugin.partialLocationProviderFactory providing ::DokkaLocationProviderFactory override listOf( - allModulesPagePlugin.baseLocationProviderFactory, - gfmTemplatingPlugin.gfmPartialLocationProvider - ) - } - - @OptIn(DokkaPluginApiPreview::class) - override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = - PluginApiPreviewAcknowledgement -} diff --git a/plugins/jekyll/jekyll-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/plugins/jekyll/jekyll-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin deleted file mode 100644 index d9584167..00000000 --- a/plugins/jekyll/jekyll-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin +++ /dev/null @@ -1,5 +0,0 @@ -# -# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. -# - -org.jetbrains.dokka.gfm.templateProcessing.JekyllTemplateProcessingPlugin diff --git a/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt b/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt deleted file mode 100644 index 733c81bb..00000000 --- a/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. - */ - -package org.jetbrains.dokka.jekyll - -import org.jetbrains.dokka.CoreExtensions -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 -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 - -public class JekyllPlugin : DokkaPlugin() { - - public val jekyllPreprocessors: ExtensionPoint<PageTransformer> by extensionPoint<PageTransformer>() - - private val dokkaBase by lazy { plugin<DokkaBase>() } - - private val gfmPlugin by lazy { plugin<GfmPlugin>() } - - public val renderer: Extension<Renderer, *, *> by extending { - (CoreExtensions.renderer - providing { JekyllRenderer(it) } - override plugin<GfmPlugin>().renderer) - } - - public val rootCreator: Extension<PageTransformer, *, *> by extending { - jekyllPreprocessors with RootCreator - } - - public val briefCommentPreprocessor: Extension<PageTransformer, *, *> by extending { - jekyllPreprocessors with BriefCommentPreprocessor() - } - - public val packageListCreator: Extension<PageTransformer, *, *> by extending { - jekyllPreprocessors providing { - PackageListCreator(it, RecognizedLinkFormat.DokkaJekyll) - } order { after(rootCreator) } - } - - public val locationProvider: Extension<LocationProviderFactory, *, *> by extending { - dokkaBase.locationProviderFactory providing ::DokkaLocationProviderFactory override listOf(gfmPlugin.locationProvider) - } - - internal val alphaVersionNotifier by extending { - CoreExtensions.postActions providing { ctx -> - PostAction { - ctx.logger.info( - "The Jekyll output format is still in Alpha so you may find bugs and experience migration " + - "issues when using it. You use it at your own risk." - ) - } - } - } - - @OptIn(DokkaPluginApiPreview::class) - override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = - PluginApiPreviewAcknowledgement -} - -public class JekyllRenderer( - context: DokkaContext -) : CommonmarkRenderer(context) { - - override val preprocessors: List<PageTransformer> = context.plugin<JekyllPlugin>().query { jekyllPreprocessors } - - override fun buildPage(page: ContentPage, content: (StringBuilder, ContentPage) -> Unit): String { - val builder = StringBuilder() - builder.append("---\n") - builder.append("title: ${page.name}\n") - builder.append("---\n") - content(builder, page) - return builder.toString() - } -} diff --git a/plugins/jekyll/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin b/plugins/jekyll/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin deleted file mode 100644 index 563945eb..00000000 --- a/plugins/jekyll/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin +++ /dev/null @@ -1,5 +0,0 @@ -# -# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. -# - -org.jetbrains.dokka.jekyll.JekyllPlugin |