aboutsummaryrefslogtreecommitdiff
path: root/plugins/jekyll/jekyll-template-processing
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-07-06 14:33:46 +0200
committerGitHub <noreply@github.com>2021-07-06 14:33:46 +0200
commitacdda6c864a54c9224bc05dc54b7049aac3a92bd (patch)
treec3532593e91c94f3c72a919a6600f1dd6c3cb928 /plugins/jekyll/jekyll-template-processing
parent0bf1d0f5491a62c56393a06cdfb4168778d9829e (diff)
downloaddokka-acdda6c864a54c9224bc05dc54b7049aac3a92bd.tar.gz
dokka-acdda6c864a54c9224bc05dc54b7049aac3a92bd.tar.bz2
dokka-acdda6c864a54c9224bc05dc54b7049aac3a92bd.zip
Change jekyll links to be .html (#1990)
Diffstat (limited to 'plugins/jekyll/jekyll-template-processing')
-rw-r--r--plugins/jekyll/jekyll-template-processing/api/jekyll-template-processing.api6
-rw-r--r--plugins/jekyll/jekyll-template-processing/build.gradle.kts17
-rw-r--r--plugins/jekyll/jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt32
-rw-r--r--plugins/jekyll/jekyll-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin1
4 files changed, 56 insertions, 0 deletions
diff --git a/plugins/jekyll/jekyll-template-processing/api/jekyll-template-processing.api b/plugins/jekyll/jekyll-template-processing/api/jekyll-template-processing.api
new file mode 100644
index 00000000..482a0d40
--- /dev/null
+++ b/plugins/jekyll/jekyll-template-processing/api/jekyll-template-processing.api
@@ -0,0 +1,6 @@
+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
new file mode 100644
index 00000000..2ccb6b89
--- /dev/null
+++ b/plugins/jekyll/jekyll-template-processing/build.gradle.kts
@@ -0,0 +1,17 @@
+import org.jetbrains.registerDokkaArtifactPublication
+
+dependencies {
+ implementation(project(":plugins:base"))
+ implementation(project(":plugins:jekyll"))
+ implementation(project(":plugins:all-modules-page"))
+ implementation(project(":plugins:templating"))
+ implementation(project(":plugins:gfm"))
+ implementation(project(":plugins:gfm:gfm-template-processing"))
+
+ val coroutines_version: String by project
+ implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version")
+}
+
+registerDokkaArtifactPublication("dokkaJekyllTemplateProcessing") {
+ artifactId = "jekyll-template-processing-plugin"
+} \ No newline at end of file
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
new file mode 100644
index 00000000..fc4f67de
--- /dev/null
+++ b/plugins/jekyll/jekyll-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/JekyllTemplateProcessingPlugin.kt
@@ -0,0 +1,32 @@
+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.jekyll.JekyllPlugin
+import org.jetbrains.dokka.plugability.DokkaPlugin
+
+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>() }
+
+ val jekyllLocationProvider by extending {
+ dokkaBase.locationProviderFactory providing MultimoduleLocationProvider::Factory override listOf(
+ jekyllPlugin.locationProvider,
+ gfmTemplatingPlugin.gfmLocationProvider
+ )
+ }
+
+ val jekyllPartialLocationProvider by extending {
+ allModulesPagePlugin.partialLocationProviderFactory providing ::DokkaLocationProviderFactory override listOf(
+ allModulesPagePlugin.baseLocationProviderFactory,
+ gfmTemplatingPlugin.gfmPartialLocationProvider
+ )
+ }
+}
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
new file mode 100644
index 00000000..492c7af8
--- /dev/null
+++ b/plugins/jekyll/jekyll-template-processing/src/main/resources/META-INF/services/org.jetbrains.dokka.plugability.DokkaPlugin
@@ -0,0 +1 @@
+org.jetbrains.dokka.gfm.templateProcessing.JekyllTemplateProcessingPlugin \ No newline at end of file