- rollback naming changes to reduce diff

This commit is contained in:
Benjamin Schoch 2022-08-30 16:14:48 +02:00 committed by Avelino
parent 9302935703
commit c78c475e27

View File

@ -55,13 +55,13 @@ func main() {
})
})
makeCategoryPages(objs)
linkCategoryPagesInIndex(string(input), query, objs)
makeSiteStruct(objs)
changeLinksInIndex(string(input), query, objs)
makeSitemap(objs)
}
func makeCategoryPages(objs map[string]*Object) {
func makeSiteStruct(objs map[string]*Object) {
for _, obj := range objs {
folder := fmt.Sprintf("tmpl/%s", obj.Slug)
err := os.Mkdir(folder, 0755)
@ -106,7 +106,7 @@ func makeObjById(selector string, s *goquery.Selection) (obj *Object) {
return
}
func linkCategoryPagesInIndex(html string, query *goquery.Document, objs map[string]*Object) {
func changeLinksInIndex(html string, query *goquery.Document, objs map[string]*Object) {
query.Find("body #content ul li ul li a").Each(func(_ int, s *goquery.Selection) {
href, hrefExists := s.Attr("href")
if !hrefExists {