Skip to content

Commit a352d19

Browse files
digitalcraftsmanbep
authored andcommitted
Fix theme count in release notes
1 parent 11bb67d commit a352d19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

releaser/releasenotes_writer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ func writeReleaseNotes(version string, infosMain, infosDocs gitInfos, to io.Writ
177177
}
178178

179179
func fetchThemeCount() (int, error) {
180-
resp, err := http.Get("https://raw.githubusercontent.com/gohugoio/hugoThemes/master/.gitmodules")
180+
resp, err := http.Get("https://raw.githubusercontent.com/gohugoio/hugoThemesSiteBuilder/main/themes.txt")
181181
if err != nil {
182182
return 0, err
183183
}
184184
defer resp.Body.Close()
185185

186186
b, _ := ioutil.ReadAll(resp.Body)
187-
return bytes.Count(b, []byte("submodule")), nil
187+
return bytes.Count(b, []byte("\n")) - bytes.Count(b, []byte("#")), nil
188188
}
189189

190190
func writeReleaseNotesToTmpFile(version string, infosMain, infosDocs gitInfos) (string, error) {

0 commit comments

Comments
 (0)