mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-28 21:01:43 -05:00
parent
2d1681d915
commit
9679443c15
1 changed files with 3 additions and 1 deletions
|
@ -739,7 +739,6 @@ func (h *HugoSites) processPartial(ctx context.Context, l logg.LevelLogger, conf
|
|||
|
||||
case files.ComponentFolderLayouts:
|
||||
tmplChanged = true
|
||||
h.init.layouts.Reset()
|
||||
templatePath := pathInfo.TrimLeadingSlash().PathNoLang()
|
||||
if !h.Tmpl().HasTemplate(templatePath) {
|
||||
tmplAdded = true
|
||||
|
@ -899,6 +898,9 @@ func (h *HugoSites) processPartial(ctx context.Context, l logg.LevelLogger, conf
|
|||
}
|
||||
|
||||
if tmplChanged || i18nChanged {
|
||||
// TODO(bep) we should split this, but currently the loading of i18n and layout files are tied together. See #12048.
|
||||
h.init.layouts.Reset()
|
||||
|
||||
if err := loggers.TimeTrackfn(func() (logg.LevelLogger, error) {
|
||||
// TODO(bep) this could probably be optimized to somehow
|
||||
// only load the changed templates and its dependencies, but that is non-trivial.
|
||||
|
|
Loading…
Reference in a new issue