Fully support single-user mode
- New editor nav - New backend nav - Support for drafts - Different footers on backend
This commit is contained in:
12
nodeinfo.go
12
nodeinfo.go
@@ -12,15 +12,23 @@ type nodeInfoResolver struct {
|
||||
db *datastore
|
||||
}
|
||||
|
||||
func nodeInfoConfig(cfg *config.Config) *nodeinfo.Config {
|
||||
func nodeInfoConfig(db *datastore, cfg *config.Config) *nodeinfo.Config {
|
||||
name := cfg.App.SiteName
|
||||
desc := "Minimal, federated blogging platform."
|
||||
if cfg.App.SingleUser {
|
||||
// Fetch blog information, instead
|
||||
coll, err := db.GetCollectionByID(1)
|
||||
if err == nil {
|
||||
desc = coll.Description
|
||||
}
|
||||
}
|
||||
return &nodeinfo.Config{
|
||||
BaseURL: cfg.App.Host,
|
||||
InfoURL: "/api/nodeinfo",
|
||||
|
||||
Metadata: nodeinfo.Metadata{
|
||||
NodeName: name,
|
||||
NodeDescription: "Minimal, federated blogging platform.",
|
||||
NodeDescription: desc,
|
||||
Private: cfg.App.Private,
|
||||
Software: nodeinfo.SoftwareMeta{
|
||||
HomePage: softwareURL,
|
||||
|
Reference in New Issue
Block a user