From c78c475e272d8b7ae2ed418e78646136772b2769 Mon Sep 17 00:00:00 2001 From: Benjamin Schoch Date: Tue, 30 Aug 2022 16:14:48 +0200 Subject: [PATCH] - rollback naming changes to reduce diff --- make_site.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/make_site.go b/make_site.go index e5b4c746..1dc62a96 100644 --- a/make_site.go +++ b/make_site.go @@ -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 {