Просмотр исходного кода

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
custom-css-config
Matt Baer 6 месяцев назад
Родитель
Сommit
289730e24a
1 измененных файлов: 1 добавлений и 1 удалений
  1. +1
    -1
      app.go

+ 1
- 1
app.go Просмотреть файл

@@ -365,7 +365,7 @@ func pageForReq(app *App, r *http.Request) page.StaticPage {
} }


// Use custom style, if file exists // 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 p.CustomCSS = true
} }




Загрузка…
Отмена
Сохранить