From b75e654ce743f55e16f505d0a739f082daf6674f Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 10 May 2023 00:16:39 +0400 Subject: [PATCH] Added sitemap.xml. --- cmd/dwelling-home/main.go | 1 + internal/http/handlers.go | 5 +++++ web/assets/sitemap.xml | 43 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 web/assets/sitemap.xml diff --git a/cmd/dwelling-home/main.go b/cmd/dwelling-home/main.go index 14e5a71..ae71e4a 100644 --- a/cmd/dwelling-home/main.go +++ b/cmd/dwelling-home/main.go @@ -74,6 +74,7 @@ func main() { srv.GET("/robots.txt", hand.Robots) srv.GET("/rss.xml", hand.RSS) + srv.GET("/sitemap.xml", hand.Sitemap) captchaApi := http.NewCaptchaApiHandlers(*captchaExpiry) diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 4377634..d2e4eee 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -145,6 +145,11 @@ func (h *Handlers) Robots(w http.ResponseWriter, r *http.Request) { w.Write(data) } +func (h *Handlers) Sitemap(w http.ResponseWriter, r *http.Request) { + data, _ := web.AssetsGetFile("sitemap.xml") + w.Write(data) +} + /**** Errors ******************************************************************/ func ForbiddenError(err, msg string, w http.ResponseWriter) { diff --git a/web/assets/sitemap.xml b/web/assets/sitemap.xml new file mode 100644 index 0000000..1fe9d3b --- /dev/null +++ b/web/assets/sitemap.xml @@ -0,0 +1,43 @@ + + + + https://arav.su/ + 2023-03-02 + + + https://arav.su/stuff + 2023-02-21 + + + https://arav.su/stuff/article/rpi_root_on_external_drive + 2022-05-25 + + + https://arav.su/stuff/article/setting_up_a_tor_proxy_relay_hiddenserv + 2022-07-17 + + + https://arav.su/stuff/article/setting_up_a_mail_server + 2022-10-26 + + + https://arav.su/stuff/article/nginx_recipes_and_tips + 2022-05-25 + + + https://arav.su/stuff/article/hardening_mikrotik + 2023-01-15 + + + https://arav.su/mindflow + always + + + https://arav.su/about + 2023-04-30 + + + https://arav.su/guestbook + always + + \ No newline at end of file