aboutsummaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'util.go')
-rw-r--r--util.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/util.go b/util.go
new file mode 100644
index 0000000..804bb2c
--- /dev/null
+++ b/util.go
@@ -0,0 +1,16 @@
+package main
+
+import (
+ "html/template"
+
+ "github.com/gin-gonic/gin"
+)
+
+func setupTemplates(router *gin.Engine) {
+ tmpl := template.Must(template.New("").ParseFS(
+ virtualFilesystem,
+ "templates/partials/*.tmpl",
+ "templates/pages/*.tmpl"),
+ )
+ router.SetHTMLTemplate(tmpl)
+}