aboutsummaryrefslogtreecommitdiff
path: root/util.go
blob: 804bb2c4f1a2e3b5b5288f4534cd796d269e40f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
}