blob: 9386111341839eb12d8c6a166a87acb8a7594a64 [file] [log] [blame]
Ilya Ryzhenkoveeb42e92014-07-14 22:29:34 +04001package org.jetbrains.dokka
2
kisenka782a0b32014-10-10 16:12:57 +04003public open class JekyllFormatService(locationService: LocationService,
Ilya Ryzhenkov455d74a2014-09-19 22:25:27 +03004 signatureGenerator: LanguageService)
Ilya Ryzhenkovd6fd0452014-10-03 20:20:02 +04005: MarkdownFormatService(locationService, signatureGenerator) {
Ilya Ryzhenkov62cb5092014-07-15 15:54:05 +04006
7 override fun link(from: DocumentationNode, to: DocumentationNode): FormatLink = link(from, to, "html")
8
Ilya Ryzhenkovd6fd0452014-10-03 20:20:02 +04009 override fun appendNodes(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) {
Ilya Ryzhenkoveeb42e92014-07-14 22:29:34 +040010 to.appendln("---")
Dmitry Jemerov8f380262014-12-29 15:32:15 +010011 appendFrontMatter(nodes, to)
Ilya Ryzhenkoveeb42e92014-07-14 22:29:34 +040012 to.appendln("---")
kisenka18bcaee2014-10-10 20:33:59 +040013 to.appendln("")
Ilya Ryzhenkovd6fd0452014-10-03 20:20:02 +040014 super<MarkdownFormatService>.appendNodes(location, to, nodes)
Ilya Ryzhenkoveeb42e92014-07-14 22:29:34 +040015 }
Dmitry Jemerov8f380262014-12-29 15:32:15 +010016
17 protected open fun appendFrontMatter(nodes: Iterable<DocumentationNode>, to: StringBuilder) {
18 to.appendln("title: ${nodes.first().name}")
19 }
Ilya Ryzhenkoveeb42e92014-07-14 22:29:34 +040020}