new: Added new tab pages and related modules

This commit is contained in:
2024-12-16 17:19:06 +08:00
parent 65e5e9eafc
commit 54f2b2e648
14 changed files with 1615 additions and 10 deletions

View File

@@ -101,7 +101,11 @@ func (ma *MApp) parseMarkdowns() error {
Hash: tagHash,
})
ma.TaggedPosts = append(ma.TaggedPosts, &post)
ma.Tags[tagHash] = tag
ma.TagsCount[tag] += 1
ma.TaggedPosts[tagHash] = append(ma.TaggedPosts[tagHash], &post)
model.SortPostsByDate(ma.TaggedPosts[tagHash])
}
for _, category := range post.Categories {
@@ -111,7 +115,11 @@ func (ma *MApp) parseMarkdowns() error {
Hash: categoryHash,
})
ma.CategorizedPosts = append(ma.CategorizedPosts, &post)
ma.Categories[categoryHash] = category
ma.CategoriesCount[category] += 1
ma.CategorizedPosts[categoryHash] = append(ma.CategorizedPosts[categoryHash], &post)
model.SortPostsByDate(ma.CategorizedPosts[categoryHash])
}
// free the raw tag and category slice