summaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
authorDaniil Gentili <daniil@daniil.it>2022-06-25 19:06:01 +0200
committerGitHub <noreply@github.com>2022-06-25 19:06:01 +0200
commit95383b7a16205d749e9d696d69d0ae665e91501e (patch)
tree9bf9edfd5bd7ed1c6da7eefa73ea8843b609f8ca /routers/web/web.go
parent97bfabc745cdcce11ce50a62e29bb7a4e7e66e6c (diff)
downloadgitea-95383b7a16205d749e9d696d69d0ae665e91501e.tar.gz
gitea-95383b7a16205d749e9d696d69d0ae665e91501e.zip
Add sitemap support (#18407)
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index 4896bdb1e4..80469ef7cd 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -294,6 +294,7 @@ func RegisterRoutes(m *web.Route) {
// Routers.
// for health check
m.Get("/", Home)
+ m.Get("/sitemap.xml", ignExploreSignIn, HomeSitemap)
m.Group("/.well-known", func() {
m.Get("/openid-configuration", auth.OIDCWellKnown)
m.Group("", func() {
@@ -310,7 +311,9 @@ func RegisterRoutes(m *web.Route) {
ctx.Redirect(setting.AppSubURL + "/explore/repos")
})
m.Get("/repos", explore.Repos)
+ m.Get("/repos/sitemap-{idx}.xml", explore.Repos)
m.Get("/users", explore.Users)
+ m.Get("/users/sitemap-{idx}.xml", explore.Users)
m.Get("/organizations", explore.Organizations)
m.Get("/code", explore.Code)
m.Get("/topics/search", explore.TopicSearch)