1
0

Added sitemap.xml.

This commit is contained in:
Alexander Andreev 2023-05-10 00:16:39 +04:00
parent 67eaa689e7
commit b75e654ce7
Signed by: Arav
GPG Key ID: D22A817D95815393
3 changed files with 49 additions and 0 deletions

View File

@ -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)

View File

@ -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) {

43
web/assets/sitemap.xml Normal file
View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://arav.su/</loc>
<lastmod>2023-03-02</lastmod>
</url>
<url>
<loc>https://arav.su/stuff</loc>
<lastmod>2023-02-21</lastmod>
</url>
<url>
<loc>https://arav.su/stuff/article/rpi_root_on_external_drive</loc>
<lastmod>2022-05-25</lastmod>
</url>
<url>
<loc>https://arav.su/stuff/article/setting_up_a_tor_proxy_relay_hiddenserv</loc>
<lastmod>2022-07-17</lastmod>
</url>
<url>
<loc>https://arav.su/stuff/article/setting_up_a_mail_server</loc>
<lastmod>2022-10-26</lastmod>
</url>
<url>
<loc>https://arav.su/stuff/article/nginx_recipes_and_tips</loc>
<lastmod>2022-05-25</lastmod>
</url>
<url>
<loc>https://arav.su/stuff/article/hardening_mikrotik</loc>
<lastmod>2023-01-15</lastmod>
</url>
<url>
<loc>https://arav.su/mindflow</loc>
<changefreq>always</changefreq>
</url>
<url>
<loc>https://arav.su/about</loc>
<lastmod>2023-04-30</lastmod>
</url>
<url>
<loc>https://arav.su/guestbook</loc>
<changefreq>always</changefreq>
</url>
</urlset>