Look for custom CSS in static_parent_dir

Previously, it would only check the current directory instead of using the configured
`static_parent_dir`. This fixes that.

Closes #792
This commit is contained in:
Matt Baer 2023-11-07 09:06:50 -05:00
parent a1becfdc83
commit 289730e24a
1 changed files with 1 additions and 1 deletions

2
app.go
View File

@ -365,7 +365,7 @@ func pageForReq(app *App, r *http.Request) page.StaticPage {
}
// Use custom style, if file exists
if _, err := os.Stat(filepath.Join(staticDir, "local", "custom.css")); err == nil {
if _, err := os.Stat(filepath.Join(app.cfg.Server.StaticParentDir, staticDir, "local", "custom.css")); err == nil {
p.CustomCSS = true
}