diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-15 15:54:05 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-15 15:54:05 +0400 |
commit | 62cb509a1a5adf0e5f9ba8d8e7545a93eb8516b2 (patch) | |
tree | 52e0ad3452a198ee279df8ed3e93c9c0a39a5f6b /src/Formats/JekyllFormatService.kt | |
parent | ad884a9ce79f191f3a7b7aed115080e341265ef3 (diff) | |
download | dokka-62cb509a1a5adf0e5f9ba8d8e7545a93eb8516b2.tar.gz dokka-62cb509a1a5adf0e5f9ba8d8e7545a93eb8516b2.tar.bz2 dokka-62cb509a1a5adf0e5f9ba8d8e7545a93eb8516b2.zip |
Refactor formatting service to detach grouping logic from markup
Diffstat (limited to 'src/Formats/JekyllFormatService.kt')
-rw-r--r-- | src/Formats/JekyllFormatService.kt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Formats/JekyllFormatService.kt b/src/Formats/JekyllFormatService.kt index 1b855b01..ff53827c 100644 --- a/src/Formats/JekyllFormatService.kt +++ b/src/Formats/JekyllFormatService.kt @@ -2,12 +2,15 @@ package org.jetbrains.dokka public class JekyllFormatService(locationService: LocationService, signatureGenerator: SignatureGenerator) : MarkdownFormatService(locationService, signatureGenerator) { - override val extension: String = "md" - override fun format(nodes: Iterable<DocumentationNode>, to: StringBuilder) { + + override fun link(from: DocumentationNode, to: DocumentationNode): FormatLink = link(from, to, "html") + + override fun appendNodes(to: StringBuilder, + nodes: Iterable<DocumentationNode>) { to.appendln("---") - to.appendln("layout: post") + to.appendln("layout: api") to.appendln("title: ${nodes.first().name}") to.appendln("---") - super<MarkdownFormatService>.format(nodes, to) + super<MarkdownFormatService>.appendNodes(to, nodes) } }
\ No newline at end of file |