From ff55c2d88803bac8a85ae649cb8712a47987f983 Mon Sep 17 00:00:00 2001 From: Keyemail Date: Fri, 26 Jul 2024 05:53:10 -0700 Subject: [PATCH] Fixed more meta data --- main.go | 18 +++++++++++++----- src/pages/gallery_content.tmpl | 2 +- src/pages/video_content.tmpl | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index dcf1734..41e2ab7 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,8 @@ type Index struct { WebpageTitle string WebpageIcon string WebpageKeywords string - WebpageDescription string + WebpageDescription string + WebpageURL string GalleryItems []GalleryItems SocialItems []SocialItems VideoItems []VideoItems @@ -22,6 +23,11 @@ type Index struct { Nav bool } +type responseWriter struct { + http.ResponseWriter + status int +} + type GalleryItems struct { URL string ID int @@ -49,6 +55,7 @@ var data = &Index { WebpageIcon: "/src/assets/main/favicon.ico", WebpageKeywords: "keyemail", WebpageDescription: "Welcome to keyemail.dev! A profile based on Keyemail.", + WebpageURL: "https://keyemail.dev", GalleryItems: galleryItems, SocialItems: socialItems, VideoItems: videoItems, @@ -170,19 +177,19 @@ func videoContentHandler(w http.ResponseWriter, req *http.Request) { } func videoHandler(w http.ResponseWriter, req *http.Request) { - renderTemplate(w, "video", data, true); + renderTemplate(w, "video", data, true) } func socialsHandler(w http.ResponseWriter, req *http.Request) { - renderTemplate(w, "socials", data, true); + renderTemplate(w, "socials", data, true) } func galleryHandler(w http.ResponseWriter, req *http.Request) { - renderTemplate(w, "gallery", data, true); + renderTemplate(w, "gallery", data, true) } func indexHandler(w http.ResponseWriter, req *http.Request) { - renderTemplate(w, "home", data, true); + renderTemplate(w, "home", data, true) } func main() { @@ -201,6 +208,7 @@ func main() { http.HandleFunc("/videos", videoHandler) http.HandleFunc("/gallery/", galleryContentHandler) http.HandleFunc("/videos/", videoContentHandler) + log.Println("Server running at http://localhost" + port) http.ListenAndServe(port, nil) } diff --git a/src/pages/gallery_content.tmpl b/src/pages/gallery_content.tmpl index f9a987e..95fe853 100644 --- a/src/pages/gallery_content.tmpl +++ b/src/pages/gallery_content.tmpl @@ -1,7 +1,7 @@ {{ define "head" }} - + {{ end }} diff --git a/src/pages/video_content.tmpl b/src/pages/video_content.tmpl index eb422fa..649fe54 100644 --- a/src/pages/video_content.tmpl +++ b/src/pages/video_content.tmpl @@ -1,7 +1,7 @@ {{ define "head" }} - + {{ end }}