1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Add functions to get config values

This commit is contained in:
Frédéric Guillot 2018-01-15 18:08:30 -08:00
parent d7f66ffa5c
commit c2fd2e747a
5 changed files with 72 additions and 12 deletions

View file

@ -36,7 +36,7 @@ type Engine struct {
func (e *Engine) parseAll() {
funcMap := template.FuncMap{
"baseURL": func() string {
return e.cfg.Get("BASE_URL", config.DefaultBaseURL)
return e.cfg.BaseURL()
},
"hasOAuth2Provider": func(provider string) bool {
return e.cfg.Get("OAUTH2_PROVIDER", "") == provider