diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2020-12-03 10:34:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 10:34:24 +0100 |
commit | 91ee8fca6fa910c1fd966c97b58398d4d9981440 (patch) | |
tree | a0fae1c3465b7cdcab04bd8b9af055a4e12f30e5 /plugins/base/src/main/kotlin | |
parent | 207a66a54f65fc2bd40baff4b144e0df6bb2eb15 (diff) | |
download | dokka-91ee8fca6fa910c1fd966c97b58398d4d9981440.tar.gz dokka-91ee8fca6fa910c1fd966c97b58398d4d9981440.tar.bz2 dokka-91ee8fca6fa910c1fd966c97b58398d4d9981440.zip |
Make navigation loading faster, improve experience on safari (#1633)
Diffstat (limited to 'plugins/base/src/main/kotlin')
-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 { |