summaryrefslogtreecommitdiff
path: root/templates.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-09-23 13:10:27 -0600
committertjpcc <tjp@ctrl-c.club>2023-09-23 13:10:27 -0600
commit32f84de36c9da1da47b718cb942afa36d1b23922 (patch)
treeb2b57235f867ab33279a3f7d9987501461360681 /templates.go
parentd59ed1060d354ce911da1e7fb19f651feeafa2c1 (diff)
use .gmi, .gmi.txt, .gph, .gph.txt everywhere for templates
Diffstat (limited to 'templates.go')
-rw-r--r--templates.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/templates.go b/templates.go
index ff45997..c90cb09 100644
--- a/templates.go
+++ b/templates.go
@@ -9,13 +9,17 @@ import (
)
var (
- //go:embed templates/*.gmi
+ //go:embed templates/*.gmi templates/*.gmi.txt
geminiTemplateFS embed.FS
- geminiTemplate = template.Must(template.ParseFS(geminiTemplateFS, "templates/*.gmi"))
+ geminiTemplate = template.Must(template.ParseFS(
+ geminiTemplateFS,
+ "templates/*.gmi",
+ "templates/*.gmi.txt",
+ ))
)
var (
- //go:embed templates/*.gophermap templates/*.gophertext
+ //go:embed templates/*.gph templates/*.gph.txt
gopherTemplateFS embed.FS
gopherTemplate = template.Must(
template.New("gopher").Funcs(template.FuncMap{
@@ -24,8 +28,8 @@ var (
"rawtext": gopherRawtext,
}).ParseFS(
gopherTemplateFS,
- "templates/*.gophermap",
- "templates/*.gophertext",
+ "templates/*.gph",
+ "templates/*.gph.txt",
),
)
)