aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/renderers/HtmlRenderer.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/renderers/HtmlRenderer.kt')
-rw-r--r--core/src/main/kotlin/renderers/HtmlRenderer.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/src/main/kotlin/renderers/HtmlRenderer.kt b/core/src/main/kotlin/renderers/HtmlRenderer.kt
index ce0e6b73..065b669a 100644
--- a/core/src/main/kotlin/renderers/HtmlRenderer.kt
+++ b/core/src/main/kotlin/renderers/HtmlRenderer.kt
@@ -23,8 +23,12 @@ open class HtmlRenderer(fileWriter: FileWriter, locationProvider: LocationProvid
override fun buildCode(code: String): String = "<code>$code</code>"
override fun buildText(text: String) = super.buildText(text).htmlEscape()
-
- override fun buildNavigation(): String = "" // TODO implement
+
+ override fun buildNavigation(page: PageNode): String {
+ fun buildNavigationWithContext(page: PageNode, context: PageNode): String =
+ page.parent?.let { buildNavigationWithContext(it, context) }.orEmpty() + "/" + buildLink(page.name, locationProvider.resolve(page, context))
+ return buildNavigationWithContext(page, page)
+ }
override fun buildGroup(children: List<ContentNode>, pageContext: PageNode): String =
children.find { it is ContentLink }?.build(pageContext) + "</td>\n" +