summaryrefslogtreecommitdiff
path: root/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'routes.go')
-rw-r--r--routes.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/routes.go b/routes.go
index 08d2c56..83f2868 100644
--- a/routes.go
+++ b/routes.go
@@ -19,6 +19,7 @@ import (
"tildegit.org/tjp/sliderule/gemini/gemtext/atomconv"
"tildegit.org/tjp/sliderule/gopher/gophermap"
"tildegit.org/tjp/sliderule/logging"
+ "tildegit.org/tjp/syw"
)
func geminiRouter(conf config) sr.Handler {
@@ -58,6 +59,10 @@ func geminiRouter(conf config) sr.Handler {
)),
)
+ if conf.geminiRepos != "" {
+ router.Mount("/git", syw.GeminiRouter(conf.geminiRepos, nil))
+ }
+
h := router.Handler()
if conf.geminiAutoAtom {
h = atomconv.Auto(h)
@@ -92,6 +97,10 @@ func gopherRouter(conf config) sr.Handler {
cgi.GopherCGIDirectory("/cgi-bin/", filepath.Join(conf.gopherRoot, "cgi-bin"), &settings),
)
+ if conf.gopherRepos != "" {
+ router.Mount("/git", syw.GopherRouter(conf.gopherRepos, nil))
+ }
+
return router.Handler()
}