Fix theme count in release notes

This commit is contained in:
Digitalcraftsman 2021-07-21 06:07:31 -07:00 committed by Bjørn Erik Pedersen
parent 11bb67dcfd
commit a352d19d88
1 changed files with 2 additions and 2 deletions

View File

@ -177,14 +177,14 @@ func writeReleaseNotes(version string, infosMain, infosDocs gitInfos, to io.Writ
}
func fetchThemeCount() (int, error) {
resp, err := http.Get("https://raw.githubusercontent.com/gohugoio/hugoThemes/master/.gitmodules")
resp, err := http.Get("https://raw.githubusercontent.com/gohugoio/hugoThemesSiteBuilder/main/themes.txt")
if err != nil {
return 0, err
}
defer resp.Body.Close()
b, _ := ioutil.ReadAll(resp.Body)
return bytes.Count(b, []byte("submodule")), nil
return bytes.Count(b, []byte("\n")) - bytes.Count(b, []byte("#")), nil
}
func writeReleaseNotesToTmpFile(version string, infosMain, infosDocs gitInfos) (string, error) {