diff options
Diffstat (limited to 'src/Formats')
-rw-r--r-- | src/Formats/JekyllFormatService.kt | 13 | ||||
-rw-r--r-- | src/Formats/MarkdownFormatService.kt | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/Formats/JekyllFormatService.kt b/src/Formats/JekyllFormatService.kt new file mode 100644 index 00000000..19878154 --- /dev/null +++ b/src/Formats/JekyllFormatService.kt @@ -0,0 +1,13 @@ +package org.jetbrains.dokka + +public class JekyllFormatService(locationService: LocationService, signatureGenerator: SignatureGenerator) +: MarkdownFormatService(locationService, signatureGenerator) { + + override fun format(nodes: Iterable<DocumentationNode>, to: StringBuilder) { + to.appendln("---") + to.appendln("layout: post") + to.appendln("title: ${nodes.first().name}") + to.appendln("---") + super<MarkdownFormatService>.format(nodes, to) + } +}
\ No newline at end of file diff --git a/src/Formats/MarkdownFormatService.kt b/src/Formats/MarkdownFormatService.kt index ae1500f2..0fcfa444 100644 --- a/src/Formats/MarkdownFormatService.kt +++ b/src/Formats/MarkdownFormatService.kt @@ -3,8 +3,8 @@ package org.jetbrains.dokka import org.jetbrains.dokka.DocumentationNode.Kind import java.util.LinkedHashMap -public class MarkdownFormatService(val locationService: LocationService, - val signatureGenerator: SignatureGenerator) : FormatService { +public open class MarkdownFormatService(val locationService: LocationService, + val signatureGenerator: SignatureGenerator) : FormatService { override val extension: String = "md" override fun format(nodes: Iterable<DocumentationNode>, to: StringBuilder) { with (to) { |