Fix that custom sitename gets ignored

This commit is contained in:
Atrox 2016-06-15 14:33:51 +02:00
parent f06b06fe76
commit aedd7bc589

View File

@ -78,6 +78,8 @@ func renderTemplate(tpl *pongo2.Template, context pongo2.Context, r *http.Reques
if Config.siteName == "" { if Config.siteName == "" {
parts := strings.Split(r.Host, ":") parts := strings.Split(r.Host, ":")
context["sitename"] = parts[0] context["sitename"] = parts[0]
} else {
context["sitename"] = Config.siteName
} }
context["sitepath"] = Config.sitePath context["sitepath"] = Config.sitePath