mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Support directly access data/public/* contents via URL link https://github.com/siyuan-note/siyuan/issues/8593
This commit is contained in:
parent
bf5caa23f8
commit
c540046b8e
2 changed files with 12 additions and 0 deletions
|
|
@ -75,6 +75,7 @@ func Serve(fastMode bool) {
|
|||
servePlugins(ginServer)
|
||||
serveEmojis(ginServer)
|
||||
serveTemplates(ginServer)
|
||||
servePublic(ginServer)
|
||||
serveRepoDiff(ginServer)
|
||||
api.ServeAPI(ginServer)
|
||||
|
||||
|
|
@ -188,6 +189,11 @@ func serveTemplates(ginServer *gin.Engine) {
|
|||
ginServer.Static("/templates/", filepath.Join(util.DataDir, "templates"))
|
||||
}
|
||||
|
||||
func servePublic(ginServer *gin.Engine) {
|
||||
// Support directly access `data/public/*` contents via URL link https://github.com/siyuan-note/siyuan/issues/8593
|
||||
ginServer.Static("/public/", filepath.Join(util.DataDir, "public"))
|
||||
}
|
||||
|
||||
func serveAppearance(ginServer *gin.Engine) {
|
||||
ginServer.StaticFile("favicon.ico", filepath.Join(util.WorkingDir, "stage", "icon.png"))
|
||||
ginServer.StaticFile("manifest.json", filepath.Join(util.WorkingDir, "stage", "manifest.webmanifest"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue