summaryrefslogtreecommitdiffstats
path: root/hugolib/hugo_sites.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/hugo_sites.go')
-rw-r--r--hugolib/hugo_sites.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go
index ad233f1c2..a0ac72d67 100644
--- a/hugolib/hugo_sites.go
+++ b/hugolib/hugo_sites.go
@@ -25,6 +25,7 @@ import (
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
+ "github.com/gohugoio/hugo/langs"
"github.com/gohugoio/hugo/i18n"
"github.com/gohugoio/hugo/tpl"
@@ -228,10 +229,7 @@ func NewHugoSites(cfg deps.DepsCfg) (*HugoSites, error) {
func (s *Site) withSiteTemplates(withTemplates ...func(templ tpl.TemplateHandler) error) func(templ tpl.TemplateHandler) error {
return func(templ tpl.TemplateHandler) error {
- templ.LoadTemplates(s.PathSpec.GetLayoutDirPath(), "")
- if s.PathSpec.ThemeSet() {
- templ.LoadTemplates(s.PathSpec.GetThemeDir()+"/layouts", "theme")
- }
+ templ.LoadTemplates("")
for _, wt := range withTemplates {
if wt == nil {
@@ -289,7 +287,7 @@ func (h *HugoSites) resetLogs() {
}
func (h *HugoSites) createSitesFromConfig() error {
- oldLangs, _ := h.Cfg.Get("languagesSorted").(helpers.Languages)
+ oldLangs, _ := h.Cfg.Get("languagesSorted").(langs.Languages)
if err := loadLanguageSettings(h.Cfg, oldLangs); err != nil {
return err