diff options
Diffstat (limited to 'routes.go')
| -rw-r--r-- | routes.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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() } |
