diff --git a/src/main/kotlin/fr/username404/website/subpages/Subpage.kt b/src/main/kotlin/fr/username404/website/subpages/Subpage.kt index 60d9126..2f31185 100644 --- a/src/main/kotlin/fr/username404/website/subpages/Subpage.kt +++ b/src/main/kotlin/fr/username404/website/subpages/Subpage.kt @@ -12,5 +12,8 @@ data class Subpage( val meta: Set?, val content: HTMLElement ) { - fun open(): Document = window.document.open(type = "text/html", replace = content.innerHTML) + fun open(): Document = window.document.open( + type = "text/html", + replace = head.map { it.innerHTML }.reduce { previous, current -> previous + "\n" + current } + ) }