Vlad Ostaci
03/30/2023, 11:03 AMtasks.withType<DokkaTask>().configureEach {
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
templatesDir = file("dokka")
customStyleSheets = listOf(file("dokka/dokka_custom_styles.css"))
}
}
My file structure looks like this:
module:
- dokka
- dokka_custom_styles.css
- includes
- page_metadata.ft
The styles are picked up correctly but not the script:
<#macro display>
<title>${pageName}</title>
<@template_cmd name="pathToRoot">
<link href="${pathToRoot}images/logo-icon.svg" rel="icon" type="image/svg">
<script>
function myCustomFunction() {
// Some code
};
window.addEventListener("DOMContentLoaded", function() {
myCustomFunction();
}, false);
</script>
</@template_cmd>
</#macro>
Ignat Beresnev
03/30/2023, 11:06 AM- page_metadata.ftis it
.ft
or .ftl
?Vlad Ostaci
03/30/2023, 11:08 AM.ft
as it's specified here https://kotlinlang.org/docs/dokka-html.html#templates:~:text=includes/page_metadata.ftIgnat Beresnev
03/30/2023, 11:09 AM.ftl
. Can you try it out?Ignat Beresnev
03/30/2023, 11:11 AM.ftl
- seems to workVlad Ostaci
03/30/2023, 11:11 AM.ftl
extension works.Vlad Ostaci
03/30/2023, 11:12 AMIgnat Beresnev
03/30/2023, 11:15 AM