diff options
author | Xinyu Zhou <its@baronbunny.cn> | 2022-10-28 23:17:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 11:17:38 -0400 |
commit | 100448a007707c049a769cb71cd170fcb5b64a25 (patch) | |
tree | 2e46e2d5b942906d87d0be3af7f882501c28c5bf /modules | |
parent | cd5c067abe6b3d33a35ec6904abc91a0b18edfd9 (diff) | |
download | gitea-100448a007707c049a769cb71cd170fcb5b64a25.tar.gz gitea-100448a007707c049a769cb71cd170fcb5b64a25.zip |
Allow disable sitemap (#21617)
This patch provide a mechanism to disable
[sitemap](https://github.com/go-gitea/gitea/pull/18407).
Signed-off-by: Xinyu Zhou <i@sourcehut.net>
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/setting/setting.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 9c4f4ced12..043acb733d 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -452,6 +452,7 @@ var ( RunUser string IsWindows bool HasRobotsTxt bool + EnableSitemap bool InternalToken string // internal access token ) @@ -1100,6 +1101,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) { ShowFooterBranding = Cfg.Section("other").Key("SHOW_FOOTER_BRANDING").MustBool(false) ShowFooterVersion = Cfg.Section("other").Key("SHOW_FOOTER_VERSION").MustBool(true) ShowFooterTemplateLoadTime = Cfg.Section("other").Key("SHOW_FOOTER_TEMPLATE_LOAD_TIME").MustBool(true) + EnableSitemap = Cfg.Section("other").Key("ENABLE_SITEMAP").MustBool(true) UI.ShowUserEmail = Cfg.Section("ui").Key("SHOW_USER_EMAIL").MustBool(true) UI.DefaultShowFullName = Cfg.Section("ui").Key("DEFAULT_SHOW_FULL_NAME").MustBool(false) |