hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit a352d19d881474f53d01791be4febd305453a9d6
parent 11bb67dcfd323e47a4e6cb31e054bb0ade13c9b4
Author: Digitalcraftsman <digitalcraftsman@users.noreply.github.com>
Date:   Wed, 21 Jul 2021 06:07:31 -0700

Fix theme count in release notes

Diffstat:
Mreleaser/releasenotes_writer.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/releaser/releasenotes_writer.go b/releaser/releasenotes_writer.go
@@ -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) {