mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
Compare commits
No commits in common. "efb63927e97bd6a42a81bdfc376bf69045b546d6" and "7972931280f36e8fd077b6222af3af5c22297e17" have entirely different histories.
efb63927e9
...
7972931280
3 changed files with 3 additions and 17 deletions
|
|
@ -1,9 +1,5 @@
|
|||
# 更新日志
|
||||
|
||||
4.3.2 - 2025-08-20
|
||||
---
|
||||
- FIX: 修正`cfg.Pages.StaticDir`为空时的处置
|
||||
|
||||
4.3.1 - 2025-08-13
|
||||
---
|
||||
- CHANGE: 更新至[Go 1.25](https://tip.golang.org/doc/go1.25)
|
||||
|
|
|
|||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
4.3.2
|
||||
4.3.1
|
||||
14
main.go
14
main.go
|
|
@ -234,18 +234,8 @@ func setupPages(cfg *config.Config, r *touka.Engine) {
|
|||
}
|
||||
|
||||
case "external":
|
||||
if cfg.Pages.StaticDir == "" {
|
||||
logger.Errorf("Pages Mode is 'external' but StaticDir is empty. Using embedded pages instead.")
|
||||
err := setInternalRoute(cfg, r)
|
||||
if err != nil {
|
||||
logger.Errorf("Failed to load embedded pages: %s", err)
|
||||
fmt.Printf("Failed to load embedded pages: %s", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
} else {
|
||||
extPageFS := os.DirFS(cfg.Pages.StaticDir)
|
||||
r.SetUnMatchFS(http.FS(extPageFS))
|
||||
}
|
||||
r.SetUnMatchFS(http.Dir(cfg.Pages.StaticDir))
|
||||
|
||||
default:
|
||||
// 处理无效的Pages Mode
|
||||
logger.Warnf("Invalid Pages Mode: %s, using default embedded theme", cfg.Pages.Mode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue