Fix server reload when non-HTML shortcode changes

Fixes #7448
This commit is contained in:
Bjørn Erik Pedersen
2020-07-03 18:02:32 +02:00
parent 028b356787
commit 42e150fbfa
6 changed files with 83 additions and 13 deletions

View File

@@ -981,14 +981,17 @@ func (h *HugoSites) resetPageStateFromEvents(idset identity.Identities) {
}
for _, s := range p.shortcodeState.shortcodes {
for id := range idset {
if idm, ok := s.info.(identity.Manager); ok && idm.Search(id) != nil {
for _, po := range p.pageOutputs {
if po.cp != nil {
po.cp.Reset()
for _, templ := range s.templs {
sid := templ.(identity.Manager)
for id := range idset {
if sid.Search(id) != nil {
for _, po := range p.pageOutputs {
if po.cp != nil {
po.cp.Reset()
}
}
return false
}
return false
}
}
}