code: func (s *Site) resetBuildState() {
  	s.relatedDocsHandler = s.relatedDocsHandler.Clone()
  	s.PageCollections = newPageCollectionsFromPages(s.rawAllPages)
  	s.buildStats = &buildStats{}
  	s.init.Reset()
  
  	for _, p := range s.rawAllPages {
  		p.pagePages = &pagePages{}
  		p.subSections = page.Pages{}
  		p.parent = nil
  		p.Scratcher = maps.NewScratcher()
  	}
  }
docs: // Prepare site for a new full build.