diff --git a/.gitignore b/.gitignore index 2ebff45..dc132a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ shitty-ssg +public diff --git a/cmd/ssg/site/config.go b/cmd/ssg/site/config.go index 2e43653..9589e20 100644 --- a/cmd/ssg/site/config.go +++ b/cmd/ssg/site/config.go @@ -54,15 +54,15 @@ func NewSiteConfig(id SiteID) (*SiteConfig, error) { func (sc *SiteConfig) ParseTemplates(tplPath string) error { for _, tplConf := range sc.TemplateConfigs { + var tFiles []string for _, tName := range tplConf.TemplateNames { - var tFiles []string tFiles = append(tFiles, filepath.Join(tplPath, fmt.Sprintf("%s.%s", tName, tplConf.TemplateExt))) - tpl, err := template.ParseFiles(tFiles...) - if err != nil { - return err - } - tplConf.Template = tpl } + tpl, err := template.ParseFiles(tFiles...) + if err != nil { + return err + } + tplConf.Template = tpl } return nil