summaryrefslogtreecommitdiff
path: root/gemini.go
diff options
context:
space:
mode:
Diffstat (limited to 'gemini.go')
-rw-r--r--gemini.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/gemini.go b/gemini.go
index cf7db73..91de5aa 100644
--- a/gemini.go
+++ b/gemini.go
@@ -34,15 +34,15 @@ const (
// The overrides argument can provide templates to define the behavior of nearly all of the above
// routes. All of them have default implementations so the argument can even be nil, but otherwise
// the template names used are:
-// repo_root.gmi gemtext at /
-// repo_home.gmi gemtext at /:repository/
-// branch_list.gmi gemtext at /:repository/branches
-// tag_list.gmi gemtext at /:repository/tags
-// ref.gmi gemtext at /:repository/refs/:ref/
-// tree.gmi gemtext for directories requested under /:repository/refs/:ref/tree/*path
-// (file paths return the raw files without any template involved)
-// diffstat.gmi the plaintext diffstat at /:repository/diffstat/:fromref/:toref
-// diff.gmi the text/x-diff at /:repository/diff/:fromref/:toref
+// repo_root.gmi gemtext at /
+// repo_home.gmi gemtext at /:repository/
+// branch_list.gmi gemtext at /:repository/branches
+// tag_list.gmi gemtext at /:repository/tags
+// ref.gmi gemtext at /:repository/refs/:ref/
+// tree.gmi gemtext for directories requested under /:repository/refs/:ref/tree/*path
+// (file paths return the raw files without any template involved)
+// diffstat.gmi.txt the plaintext diffstat at /:repository/diffstat/:fromref/:toref
+// diff.gmi.txt the text/x-diff at /:repository/diff/:fromref/:toref
//
// Most of the templates above are rendered with an object with 3 fields:
// Ctx: the context.Context from the request
@@ -63,8 +63,8 @@ func GeminiRouter(repodir string, overrides *template.Template) *sliderule.Route
repoRouter.Route("/tags", gmiTemplate(tmpl, "tag_list.gmi"))
repoRouter.Route("/refs/:ref/", gmiTemplate(tmpl, "ref.gmi"))
repoRouter.Route("/refs/:ref/tree/*path", geminiTreePath(tmpl))
- repoRouter.Route("/diffstat/:fromref/:toref", runGemiTemplate(tmpl, "diffstat.gmi", "text/plain"))
- repoRouter.Route("/diff/:fromref/:toref", runGemiTemplate(tmpl, "diff.gmi", "text/x-diff"))
+ repoRouter.Route("/diffstat/:fromref/:toref", runGemiTemplate(tmpl, "diffstat.gmi.txt", "text/plain"))
+ repoRouter.Route("/diff/:fromref/:toref", runGemiTemplate(tmpl, "diff.gmi.txt", "text/x-diff"))
router := &sliderule.Router{}
router.Route("/", geminiRoot(repodir, tmpl))