aboutsummaryrefslogtreecommitdiff
path: root/src/Generation
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2015-12-03 12:13:17 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2015-12-03 12:13:17 +0100
commit797cb4732c53bf1e3b2091add8cf731fc436607f (patch)
tree5470caa451bdea99c371793bcc5411e179d1df71 /src/Generation
parent610ca01d0e2d6443f19b4218b26863cdacce07f1 (diff)
parent90cf2ebccd12073a55ff6f187e5a378a2e96e23b (diff)
downloaddokka-797cb4732c53bf1e3b2091add8cf731fc436607f.tar.gz
dokka-797cb4732c53bf1e3b2091add8cf731fc436607f.tar.bz2
dokka-797cb4732c53bf1e3b2091add8cf731fc436607f.zip
Merge pull request #38 from mikehearn/style-css
Enable browsing of the output HTML with CSS
Diffstat (limited to 'src/Generation')
-rw-r--r--src/Generation/FileGenerator.kt6
-rw-r--r--src/Generation/Generator.kt2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/Generation/FileGenerator.kt b/src/Generation/FileGenerator.kt
index 810038fa..a762bae3 100644
--- a/src/Generation/FileGenerator.kt
+++ b/src/Generation/FileGenerator.kt
@@ -42,6 +42,12 @@ public class FileGenerator @Inject constructor(val locationService: FileLocation
}
}
}
+
+ override fun buildSupportFiles() {
+ FileOutputStream(locationService.location(listOf("style.css"), false).file).use {
+ javaClass.getResourceAsStream("/dokka/styles/style.css").copyTo(it)
+ }
+ }
}
private fun File.mkdirsOrFail() {
diff --git a/src/Generation/Generator.kt b/src/Generation/Generator.kt
index d7db1c52..ac10a6a5 100644
--- a/src/Generation/Generator.kt
+++ b/src/Generation/Generator.kt
@@ -3,11 +3,13 @@ package org.jetbrains.dokka
public interface Generator {
fun buildPages(nodes: Iterable<DocumentationNode>)
fun buildOutlines(nodes: Iterable<DocumentationNode>)
+ fun buildSupportFiles()
}
fun Generator.buildAll(nodes: Iterable<DocumentationNode>) {
buildPages(nodes)
buildOutlines(nodes)
+ buildSupportFiles()
}
fun Generator.buildPage(node: DocumentationNode): Unit = buildPages(listOf(node))