feat(dashboard): add default opengraph embed tags
This commit is contained in:
parent
7f816f50f7
commit
0e1b5c5e02
@ -25,6 +25,8 @@ var baseURL = "https://api.pluralkit.me/v2"
|
||||
|
||||
var version = "dev"
|
||||
|
||||
const defaultEmbed = `<meta property="og:title" content="PluralKit | web dashboard" /> <meta name="theme-color" content="#da9317">`
|
||||
|
||||
func main() {
|
||||
r := chi.NewRouter()
|
||||
|
||||
@ -66,7 +68,7 @@ func notFoundHandler(rw http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
data, err = fs.ReadFile("dist/index.html")
|
||||
rw.Header().Add("content-type", "text/html")
|
||||
data = []byte(strings.Replace(string(data), `<!-- extra data -->`, "", 1))
|
||||
data = []byte(strings.Replace(string(data), `<!-- extra data -->`, defaultEmbed, 1))
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user