SEO for collection page.

This commit is contained in:
2025-07-31 16:24:40 +08:00
parent 63ebbebb02
commit f762e74e4d

View File

@@ -133,8 +133,8 @@ func serveIndexHtml(c fiber.Ctx) error {
preFetchData = url.PathEscape(string(preFetchDataJson)) preFetchData = url.PathEscape(string(preFetchDataJson))
} }
} }
} else if strings.HasPrefix(path, "/collections/") { } else if strings.HasPrefix(path, "/collection/") {
collectionIDStr := strings.TrimPrefix(path, "/collections/") collectionIDStr := strings.TrimPrefix(path, "/collection/")
collectionID, err := strconv.Atoi(collectionIDStr) collectionID, err := strconv.Atoi(collectionIDStr)
if err == nil { if err == nil {
coll, err := service.GetCollectionByID(uint(collectionID)) coll, err := service.GetCollectionByID(uint(collectionID))