mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-01 05:11:38 -05:00
Fix theme count in release notes
This commit is contained in:
parent
11bb67dcfd
commit
a352d19d88
1 changed files with 2 additions and 2 deletions
|
@ -177,14 +177,14 @@ func writeReleaseNotes(version string, infosMain, infosDocs gitInfos, to io.Writ
|
||||||
}
|
}
|
||||||
|
|
||||||
func fetchThemeCount() (int, error) {
|
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 {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
b, _ := ioutil.ReadAll(resp.Body)
|
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) {
|
func writeReleaseNotesToTmpFile(version string, infosMain, infosDocs gitInfos) (string, error) {
|
||||||
|
|
Loading…
Reference in a new issue