summaryrefslogtreecommitdiffstats
path: root/templates/repo/header.tmpl
diff options
context:
space:
mode:
authorXinyu Zhou <i@sourcehut.net>2022-11-21 13:14:58 +0800
committerGitHub <noreply@github.com>2022-11-21 13:14:58 +0800
commitb4802b9b2eae044e35f022dc7116986e4762a944 (patch)
tree797be6fa1bff09a869c03344d4d01cb5710b9973 /templates/repo/header.tmpl
parent9380bb6d0c7fb8d2652d19a9aec87994a6e99f8c (diff)
downloadgitea-b4802b9b2eae044e35f022dc7116986e4762a944.tar.gz
gitea-b4802b9b2eae044e35f022dc7116986e4762a944.zip
Allow disable RSS/Atom feed (#21622)
This patch provide a mechanism to disable RSS/Atom feed. Signed-off-by: Xinyu Zhou <i@sourcehut.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r--templates/repo/header.tmpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 831784a623..e6bd839f57 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -13,7 +13,9 @@
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
<div class="mx-2">/</div>
<a href="{{$.RepoLink}}">{{.Name}}</a>
- <a href="{{$.RepoLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{$.locale.Tr "rss_feed"}}" data-position="top center">{{svg "octicon-rss" 18}}</i></a>
+ {{if $.EnableFeed}}
+ <a href="{{$.RepoLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{$.locale.Tr "rss_feed"}}" data-position="top center">{{svg "octicon-rss" 18}}</i></a>
+ {{end}}
<div class="labels df ac fw">
{{if .IsTemplate}}
{{if .IsPrivate}}