aboutsummaryrefslogtreecommitdiff
path: root/src/Formats
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2014-12-29 20:52:37 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2014-12-29 20:52:37 +0100
commit7db96f8da4317cd290ccc9f988c534f10923dbbb (patch)
treed2761c3df6586bf51916dfec296a0a83793f1b2f /src/Formats
parent41aeba5f437a7d31e4ee34a660e8262ba7d27790 (diff)
parentbe20c3f5bc21ab5604b31b2af419b9076a743d74 (diff)
downloaddokka-7db96f8da4317cd290ccc9f988c534f10923dbbb.tar.gz
dokka-7db96f8da4317cd290ccc9f988c534f10923dbbb.tar.bz2
dokka-7db96f8da4317cd290ccc9f988c534f10923dbbb.zip
Merge pull request #5 from orangy/command-line-format
Command line format
Diffstat (limited to 'src/Formats')
-rw-r--r--src/Formats/JekyllFormatService.kt7
-rw-r--r--src/Formats/KotlinWebsiteFormatService.kt5
2 files changed, 10 insertions, 2 deletions
diff --git a/src/Formats/JekyllFormatService.kt b/src/Formats/JekyllFormatService.kt
index 5179b37d..93861113 100644
--- a/src/Formats/JekyllFormatService.kt
+++ b/src/Formats/JekyllFormatService.kt
@@ -8,10 +8,13 @@ public open class JekyllFormatService(locationService: LocationService,
override fun appendNodes(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) {
to.appendln("---")
- to.appendln("layout: api")
- to.appendln("title: ${nodes.first().name}")
+ appendFrontMatter(nodes, to)
to.appendln("---")
to.appendln("")
super<MarkdownFormatService>.appendNodes(location, to, nodes)
}
+
+ protected open fun appendFrontMatter(nodes: Iterable<DocumentationNode>, to: StringBuilder) {
+ to.appendln("title: ${nodes.first().name}")
+ }
} \ No newline at end of file
diff --git a/src/Formats/KotlinWebsiteFormatService.kt b/src/Formats/KotlinWebsiteFormatService.kt
index e694e222..4f7a013a 100644
--- a/src/Formats/KotlinWebsiteFormatService.kt
+++ b/src/Formats/KotlinWebsiteFormatService.kt
@@ -5,6 +5,11 @@ public class KotlinWebsiteFormatService(locationService: LocationService,
: JekyllFormatService(locationService, signatureGenerator) {
override val extension: String = "md"
+ override fun appendFrontMatter(nodes: Iterable<DocumentationNode>, to: StringBuilder) {
+ super.appendFrontMatter(nodes, to)
+ to.appendln("layout: api")
+ }
+
override public fun formatBreadcrumbs(items: Iterable<FormatLink>): String {
items.drop(1)