Browse Source

Updated to Test Format

Yoginth 7 năm trước cách đây
mục cha
commit
32106ebcd7
2 tập tin đã thay đổi với 4 bổ sung11 xóa
  1. 1 1
      cmd/web.go
  2. 3 10
      templates/user/sitemap.tmpl

+ 1 - 1
cmd/web.go

@@ -323,7 +323,7 @@ func runWeb(c *cli.Context) error {
 	// ***** END: Pages *****
 
 	m.Group("/sitemap", func() {
-		m.Get("/users.xml", ignSignIn, admin.Sitemap)
+		m.Get("/users", ignSignIn, admin.Sitemap)
 	})
 
 	// ***** START: Misc *****

+ 3 - 10
templates/user/sitemap.tmpl

@@ -1,10 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-    {{range .Users}}
-    <url>
-        <loc>https://gitote.in/{{.Name}}</loc>
-        <changefreq>Daily</changefreq>
-        <priority>1.0</priority>
-    </url>
-    {{end}}
-</urlset>
+{{range .Users}}
+https://gitote.in/{{.Name}}
+{{end}}