From 0e1b5c5e0204eeddb881fc78a77e4c8d55c60a7c Mon Sep 17 00:00:00 2001 From: spiral Date: Sun, 5 Jun 2022 11:33:09 -0400 Subject: [PATCH] feat(dashboard): add default opengraph embed tags --- dashboard/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dashboard/main.go b/dashboard/main.go index 3e7a6bd6..2d416749 100644 --- a/dashboard/main.go +++ b/dashboard/main.go @@ -25,6 +25,8 @@ var baseURL = "https://api.pluralkit.me/v2" var version = "dev" +const defaultEmbed = ` ` + 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), ``, "", 1)) + data = []byte(strings.Replace(string(data), ``, defaultEmbed, 1)) } if err != nil {