mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
frontend for pinned resources
This commit is contained in:
@@ -155,6 +155,14 @@ func serveIndexHtml(c fiber.Ctx) error {
|
||||
preFetchData = url.PathEscape(string(preFetchDataJson))
|
||||
}
|
||||
}
|
||||
} else if path == "/" || path == "" {
|
||||
pinned, err := service.GetPinnedResources()
|
||||
if err == nil {
|
||||
preFetchDataJson, _ := json.Marshal(map[string]interface{}{
|
||||
"pinned": pinned,
|
||||
})
|
||||
preFetchData = url.PathEscape(string(preFetchDataJson))
|
||||
}
|
||||
}
|
||||
|
||||
content = strings.ReplaceAll(content, "{{SiteName}}", siteName)
|
||||
|
Reference in New Issue
Block a user