diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 3bafb8f5..8c319f98 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -725,6 +725,9 @@ open class HtmlRenderer( meta(name = "viewport", content = "width=device-width, initial-scale=1", charset = "UTF-8") title(page.name) link(href = page.root("images/logo-icon.svg"), rel = "icon", type = "image/svg") + templateCommand(PathToRootSubstitutionCommand("###", default = locationProvider.pathToRoot(page))) { + script { unsafe { +"""var pathToRoot = "###";""" } } + } resources.forEach { when { it.substringBefore('?').substringAfterLast('.') == "css" -> link( @@ -741,9 +744,6 @@ open class HtmlRenderer( else -> unsafe { +it } } } - templateCommand(PathToRootSubstitutionCommand("###", default = locationProvider.pathToRoot(page))) { - script { unsafe { +"""var pathToRoot = "###";""" } } - } } body { div { |