Skip to content

Commit

Permalink
fix: Another fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
LichtHund committed Jun 26, 2024
1 parent 2c5fc31 commit f9b28fc
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
1 change: 1 addition & 0 deletions backend/src/main/kotlin/api/ProjectSetup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ 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
52 changes: 47 additions & 5 deletions backend/src/main/kotlin/website/pages/docs/DocsPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import dev.triumphteam.website.project.SummaryEntry
import io.ktor.http.HttpStatusCode
import io.ktor.server.application.call
import io.ktor.server.html.respondHtml
import io.ktor.server.request.path
import io.ktor.server.request.uri
import io.ktor.server.response.respond
import io.ktor.server.response.respondRedirect
Expand Down Expand Up @@ -106,24 +105,67 @@ private fun HTML.renderFullPage(
val title = "TrimphTeam | ${project.name} - ${currentPage.title}"

meta {
name = "og:type"
name = "description"
content = currentPage.subTitle
}

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

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

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

meta {
name = "og:title"
content = title
}

meta {
name = "og:description"
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"
}

// Twitter Meta Tags
meta {
name = "twitter:card"
content = "summary_large_image"
}

meta {
name = "twitter:title"
content = title
}

meta {
name = "twitter:description"
content = currentPage.subTitle
}

meta {
name = "og:image"
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 =
"https://new.triumphteam.dev/assets/${project.id}/${version.reference}/${currentPage.id}/banner.png"
}

title { +title }
Expand Down

0 comments on commit f9b28fc

Please sign in to comment.