aboutsummaryrefslogtreecommitdiff
path: root/plugins/jekyll/jekyll-template-processing/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jekyll/jekyll-template-processing/src')
-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
2 files changed, 33 insertions, 0 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
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