summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authora73x <[email protected]>2024-08-27 20:29:39 +0100
committera73x <[email protected]>2024-08-27 20:29:39 +0100
commite4288632856f79952fc25b17ced4895a51f6aefd (patch)
tree44a00497ea561158a74eba62fba4c29ad91fb9e8 /pages
parentd38fc83df3824b840f0b3930e4cb7236bdab84b2 (diff)
chore(embed): refactor embed fs
Diffstat (limited to 'pages')
-rw-r--r--pages/pages.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pages/pages.go b/pages/pages.go
index fbd179a..63c3432 100644
--- a/pages/pages.go
+++ b/pages/pages.go
@@ -5,9 +5,9 @@ import (
"fmt"
"text/template"
- "git.sr.ht/~a73x/home"
"git.sr.ht/~a73x/home/html"
"git.sr.ht/~a73x/home/markdown"
+ "git.sr.ht/~a73x/home/templates"
)
type GlobalState struct {
@@ -21,8 +21,8 @@ type ParserPair struct {
func renderTemplate(config GlobalState, content markdown.Content) (string, error) {
tmpl := content.Meta["template"]
- chosenTemplate := fmt.Sprintf("templates/%s.html", tmpl)
- t, err := template.ParseFS(home.Content, chosenTemplate, "templates/layouts/*.html")
+ chosenTemplate := fmt.Sprintf("%s.html", tmpl)
+ t, err := template.ParseFS(templates.FS, chosenTemplate, "layouts/*.html")
if err != nil {
return "", fmt.Errorf("failed to parse layouts: %v", err)
}