code: func (h *HugoSites) reset(config *BuildCfg) {
  	if config.ResetState {
  		for i, s := range h.Sites {
  			h.Sites[i] = s.reset()
  			if r, ok := s.Fs.Destination.(hugofs.Reseter); ok {
  				r.Reset()
  			}
  		}
  	}
  
  	h.fatalErrorHandler = &fatalErrorHandler{
  		h:     h,
  		donec: make(chan bool),
  	}
  
  	h.init.Reset()
  }
docs: // Reset resets the sites and template caches etc., making it ready for a full rebuild.