diff --git a/admin.go b/admin.go index 7785a5f..07974b6 100644 --- a/admin.go +++ b/admin.go @@ -113,6 +113,7 @@ func handleAdminUpdateSite(app *app, u *User, w http.ResponseWriter, r *http.Req func handleAdminUpdateConfig(app *app, u *User, w http.ResponseWriter, r *http.Request) error { app.cfg.App.SiteName = r.FormValue("site_name") + app.cfg.App.SiteDesc = r.FormValue("site_desc") app.cfg.App.OpenRegistration = r.FormValue("open_registration") == "on" mul, err := strconv.Atoi(r.FormValue("min_username_len")) if err == nil { diff --git a/config/config.go b/config/config.go index 50a904b..438dc15 100644 --- a/config/config.go +++ b/config/config.go @@ -31,6 +31,7 @@ type ( AppCfg struct { SiteName string `ini:"site_name"` + SiteDesc string `ini:"site_description"` Host string `ini:"host"` // Site appearance diff --git a/nodeinfo.go b/nodeinfo.go index eab15cc..d247168 100644 --- a/nodeinfo.go +++ b/nodeinfo.go @@ -14,7 +14,10 @@ type nodeInfoResolver struct { func nodeInfoConfig(db *datastore, cfg *config.Config) *nodeinfo.Config { name := cfg.App.SiteName - desc := "Minimal, federated blogging platform." + desc := cfg.App.SiteDesc + if desc == "" { + desc = "Minimal, federated blogging platform." + } if cfg.App.SingleUser { // Fetch blog information, instead coll, err := db.GetCollectionByID(1) diff --git a/templates/user/admin.tmpl b/templates/user/admin.tmpl index 41b51ee..9d19494 100644 --- a/templates/user/admin.tmpl +++ b/templates/user/admin.tmpl @@ -92,6 +92,10 @@ function savePage(el) {