Add meta tags for slack/discord preview
This commit is contained in:
parent
cfffbdccd7
commit
8e5becc777
@ -11,6 +11,9 @@ object AboutPage {
|
||||
val content = HtmlContent(HttpStatusCode.OK) {
|
||||
head {
|
||||
link(rel = "stylesheet", href = "/style.css", type = "text/css")
|
||||
meta(content = "About Kodeshare – a FOSS [ph]astebin alternative") {
|
||||
attributes["property"] = "og:title"
|
||||
}
|
||||
}
|
||||
body {
|
||||
div("wrapper") {
|
||||
|
@ -8,7 +8,7 @@ object Homepage {
|
||||
val content = HtmlContent(HttpStatusCode.OK) {
|
||||
head {
|
||||
link(rel = "stylesheet", href = "/style.css", type = "text/css")
|
||||
meta(content = "Kodeshare – a FOSS pastebin alternative") {
|
||||
meta(content = "Kodeshare – a FOSS [ph]astebin alternative") {
|
||||
attributes["property"] = "og:title"
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,13 @@ object PastePage {
|
||||
type = "text/css"
|
||||
)
|
||||
script(src = "https://p.kageru.moe/static/hl.js") {}
|
||||
meta(content = "Kodeshare – a FOSS [ph]astebin alternative") {
|
||||
attributes["property"] = "og:title"
|
||||
}
|
||||
// Show the first 3 lines in preview/embed for applications like discord, slack, or skype
|
||||
meta(content = content.lines().take(3).joinToString("\n")) {
|
||||
attributes["property"] = "og:description"
|
||||
}
|
||||
unsafe {
|
||||
+"<script>hljs.initHighlightingOnLoad();</script>"
|
||||
+"<style>html{scrollbar-color: transparent transparent;}::-webkit-scrollbar{display: none;}</style>"
|
||||
|
Loading…
Reference in New Issue
Block a user