2023-02-19 09:12:01 -07:00
|
|
|
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
package setting
|
|
|
|
|
2023-04-22 17:38:25 -06:00
|
|
|
import "code.gitea.io/gitea/modules/log"
|
|
|
|
|
|
|
|
type OtherConfig struct {
|
2023-02-19 09:12:01 -07:00
|
|
|
ShowFooterVersion bool
|
|
|
|
ShowFooterTemplateLoadTime bool
|
2024-04-03 10:01:50 -06:00
|
|
|
ShowFooterPoweredBy bool
|
2023-02-19 09:12:01 -07:00
|
|
|
EnableFeed bool
|
|
|
|
EnableSitemap bool
|
2023-04-22 17:38:25 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
var Other = OtherConfig{
|
|
|
|
ShowFooterVersion: true,
|
|
|
|
ShowFooterTemplateLoadTime: true,
|
2024-04-03 10:01:50 -06:00
|
|
|
ShowFooterPoweredBy: true,
|
2023-04-22 17:38:25 -06:00
|
|
|
EnableSitemap: true,
|
|
|
|
EnableFeed: true,
|
|
|
|
}
|
2023-02-19 09:12:01 -07:00
|
|
|
|
|
|
|
func loadOtherFrom(rootCfg ConfigProvider) {
|
|
|
|
sec := rootCfg.Section("other")
|
2023-04-22 17:38:25 -06:00
|
|
|
if err := sec.MapTo(&Other); err != nil {
|
|
|
|
log.Fatal("Failed to map [other] settings: %v", err)
|
|
|
|
}
|
2023-02-19 09:12:01 -07:00
|
|
|
}
|