mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
feat: set html base path from server base path
refactor: services
This commit is contained in:
@ -2,6 +2,7 @@ package routes
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/muety/wakapi/models"
|
||||
"github.com/muety/wakapi/utils"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
@ -22,6 +23,9 @@ func loadTemplates() {
|
||||
"date": utils.FormatDateHuman,
|
||||
"title": strings.Title,
|
||||
"capitalize": utils.Capitalize,
|
||||
"getBasePath": func() string {
|
||||
return models.GetConfig().BasePath
|
||||
},
|
||||
})
|
||||
templates = make(map[string]*template.Template)
|
||||
|
||||
|
Reference in New Issue
Block a user