diff options
| author | tjpcc <tjp@ctrl-c.club> | 2023-09-17 18:39:02 -0600 |
|---|---|---|
| committer | tjpcc <tjp@ctrl-c.club> | 2023-09-17 18:39:02 -0600 |
| commit | 8b6ec37932c72e41c66d82337748dc75eba57f25 (patch) | |
| tree | 02a2cd3414c2ea3980a5eca327f7f0c54039f01e /routes.go | |
| parent | b8cd694a2d4e4f12caa413b0407c2b7a7f836d45 (diff) | |
add syw and gemini and gopher routers at /git/
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() } |
