diff options
Diffstat (limited to 'pages/pages.go')
| -rw-r--r-- | pages/pages.go | 6 |
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) } |
