Yoginth 7 rokov pred
rodič
commit
57887c0b65
3 zmenil súbory, kde vykonal 12 pridanie a 0 odobranie
  1. 1 0
      cmd/web.go
  2. 8 0
      routes/admin/sitemap.go
  3. 3 0
      templates/sitemap.tmpl

+ 1 - 0
cmd/web.go

@@ -323,6 +323,7 @@ func runWeb(c *cli.Context) error {
 	// ***** END: Pages *****
 
 	m.Group("/sitemap", func() {
+		m.Get("", ignSignIn, admin.Sitemap)
 		m.Get("/users", ignSignIn, admin.UserSitemap)
 		m.Get("/orgs", ignSignIn, admin.OrgSitemap)
 		m.Get("/repos", ignSignIn, admin.RepoSitemap)

+ 8 - 0
routes/admin/sitemap.go

@@ -13,6 +13,9 @@ import (
 )
 
 const (
+	// SitemapTPL page template
+	SitemapTPL = "sitemap"
+
 	// UserSitemapTPL page template
 	UserSitemapTPL = "user/sitemap"
 
@@ -23,6 +26,11 @@ const (
 	RepoSitemapTPL = "repo/sitemap"
 )
 
+// Sitemap shows about page
+func Sitemap(c *context.Context) {
+	c.HTML(200, SitemapTPL)
+}
+
 // UserSitemap shows about page
 func UserSitemap(c *context.Context) {
 	routes.RenderUserSearch(c, &routes.UserSearchOptions{

+ 3 - 0
templates/sitemap.tmpl

@@ -0,0 +1,3 @@
+https://gitote.in/sitemap/users
+https://gitote.in/sitemap/orgs
+https://gitote.in/sitemap/repos