diff options
Diffstat (limited to 'hugolib/site.go')
-rw-r--r-- | hugolib/site.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hugolib/site.go b/hugolib/site.go index bf07d52b1..fb5dee46b 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -917,10 +917,12 @@ func (s *Site) processPartial(config *BuildCfg, init func(config *BuildCfg) erro logger = helpers.NewDistinctFeedbackLogger() ) - cachePartitions := make([]string, len(events)) + var cachePartitions []string - for i, ev := range events { - cachePartitions[i] = resources.ResourceKeyPartition(ev.Name) + for _, ev := range events { + if assetsFilename := s.BaseFs.Assets.MakePathRelative(ev.Name); assetsFilename != "" { + cachePartitions = append(cachePartitions, resources.ResourceKeyPartitions(assetsFilename)...) + } if s.isContentDirEvent(ev) { logger.Println("Source changed", ev) |