mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 14:16:06 +00:00
fixed #656. Templates work properly when watching.
This commit is contained in:
1 parent
4a2f16f91e
commit
cdbc741cb8
2 files changed
+7
-1
No files matched your search
+1
-1
@@ -167,7 +167,7 @@ func (s *Site) Analyze() {
|
||||
}
|
||||
|
||||
func (s *Site) prepTemplates() {
|
||||
s.Tmpl = tpl.T()
|
||||
s.Tmpl = tpl.InitializeT()
|
||||
s.Tmpl.LoadTemplates(s.absLayoutDir())
|
||||
if s.hasTheme() {
|
||||
s.Tmpl.LoadTemplatesWithPrefix(s.absThemeDir()+"/layouts", "theme")
|
||||
|
||||
@@ -66,6 +66,12 @@ func T() Template {
|
||||
return tmpl
|
||||
}
|
||||
|
||||
// Resets the internal template state to it's initial state
|
||||
func InitializeT() Template {
|
||||
tmpl = New()
|
||||
return tmpl
|
||||
}
|
||||
|
||||
// Return a new Hugo Template System
|
||||
// With all the additional features, templates & functions
|
||||
func New() Template {
|
||||
|
||||
Reference in new issue
Block a user