From eeb42e92f5eaf1c05f8102fec57d348feaca2e5c Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Mon, 14 Jul 2014 22:29:34 +0400 Subject: Add jekyll format service --- src/Formats/JekyllFormatService.kt | 13 +++++++++++++ src/Formats/MarkdownFormatService.kt | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/Formats/JekyllFormatService.kt (limited to 'src/Formats') 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, to: StringBuilder) { + to.appendln("---") + to.appendln("layout: post") + to.appendln("title: ${nodes.first().name}") + to.appendln("---") + super.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, to: StringBuilder) { with (to) { -- cgit