mirror of
https://github.com/avelino/awesome-go.git
synced 2024-11-07 16:33:40 +00:00
- rollback naming changes to reduce diff
This commit is contained in:
parent
9302935703
commit
c78c475e27
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user