Skip to content

Commit

Permalink
fix: Please work :c
Browse files Browse the repository at this point in the history
  • Loading branch information
LichtHund committed Jun 26, 2024
1 parent f9b28fc commit 4cf325f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
1 change: 0 additions & 1 deletion backend/src/main/kotlin/api/ProjectSetup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public fun setupRepository(projects: File) {
}

val coreDir = DATA_FOLDER.resolve("core").also(File::mkdirs)
println(coreDir.absolutePath)
// Copy files
tempFolder.listFiles()?.filter(File::isDirectory)?.forEach {
it.copyRecursively(coreDir.resolve(it.name), overwrite = true)
Expand Down
1 change: 0 additions & 1 deletion backend/src/main/kotlin/website/pages/Common.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package dev.triumphteam.backend.website.pages

import dev.triumphteam.backend.api.database.ProjectEntity
import kotlinx.html.FlowContent
import kotlinx.html.HEAD
import kotlinx.html.HTML
Expand Down
28 changes: 9 additions & 19 deletions backend/src/main/kotlin/website/pages/docs/DocsPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ private fun HTML.renderFullPage(
styleLink("/static/css/themes/one_dark.css")

val title = "TrimphTeam | ${project.name} - ${currentPage.title}"
// TODO: Replace with final URL, sucks that it can't be relative
val image = "https://new.triumphteam.dev/assets/${project.id}/${version.reference}/${currentPage.id}/banner.png"

meta {
name = "description"
Expand All @@ -111,38 +113,28 @@ private fun HTML.renderFullPage(

// Facebook Meta Tags
meta {
unsafe {
raw("property = \"og:type\"")
}
attributes["property"] = "og:type"
content = "article"
}

meta {
unsafe {
raw("property = \"og:title\"")
}
attributes["property"] = "og:title"
content = title
}

meta {
unsafe {
raw("property = \"og:description\"")
}
attributes["property"] = "og:description"
content = currentPage.subTitle
}

meta {
name = "og:title"
attributes["property"] = "og:title"
content = title
}

meta {
unsafe {
raw("property = \"og:image\"")
}
// TODO: Replace with final URL, sucks that it can't be relative
content =
"https://new.triumphteam.dev/assets/${project.id}/${version.reference}/${currentPage.id}/banner.png"
attributes["property"] = "og:image"
content = image
}

// Twitter Meta Tags
Expand All @@ -163,9 +155,7 @@ private fun HTML.renderFullPage(

meta {
name = "twitter:image"
// TODO: Replace with final URL, sucks that it can't be relative
content =
"https://new.triumphteam.dev/assets/${project.id}/${version.reference}/${currentPage.id}/banner.png"
content = image
}

title { +title }
Expand Down

0 comments on commit 4cf325f

Please sign in to comment.