loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add `[other].SHOW_FOOTER_POWERED_BY` setting to hide `Powered by` (#30253)

This allows you to hide the "Powered by" text in footer via
`SHOW_FOOTER_POWERED_BY` flag in configuration.

---------

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 609a627a44dbcb7b630ff51ce9f4b9f448b48ca8)

Conflicts:
- docs/content/administration/config-cheat-sheet.en-us.md
- docs/content/administration/config-cheat-sheet.zh-cn.md
Removed both, they're Gitea specific.
- templates/base/footer_content.tmpl
Applied the change manually, keeping the Forgejo footer.

authored by

Yakov
silverwind
and committed by
Gergely Nagy
b0ff1a17 0eb2105b

+10 -1
+2
custom/conf/app.example.ini
··· 2331 2331 ;SHOW_FOOTER_VERSION = true 2332 2332 ;; Show template execution time in the footer 2333 2333 ;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true 2334 + ;; Show the "powered by" text in the footer 2335 + ;SHOW_FOOTER_POWERED_BY = true 2334 2336 ;; Generate sitemap. Defaults to `true`. 2335 2337 ;ENABLE_SITEMAP = true 2336 2338 ;; Enable/Disable RSS/Atom feed
+2
modules/setting/other.go
··· 8 8 type OtherConfig struct { 9 9 ShowFooterVersion bool 10 10 ShowFooterTemplateLoadTime bool 11 + ShowFooterPoweredBy bool 11 12 EnableFeed bool 12 13 EnableSitemap bool 13 14 } ··· 15 16 var Other = OtherConfig{ 16 17 ShowFooterVersion: true, 17 18 ShowFooterTemplateLoadTime: true, 19 + ShowFooterPoweredBy: true, 18 20 EnableSitemap: true, 19 21 EnableFeed: true, 20 22 }
+3
modules/templates/helper.go
··· 109 109 "ShowFooterTemplateLoadTime": func() bool { 110 110 return setting.Other.ShowFooterTemplateLoadTime 111 111 }, 112 + "ShowFooterPoweredBy": func() bool { 113 + return setting.Other.ShowFooterPoweredBy 114 + }, 112 115 "AllowedReactions": func() []string { 113 116 return setting.UI.Reactions 114 117 },
+3 -1
templates/base/footer_content.tmpl
··· 1 1 <footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}"> 2 2 <div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}"> 3 - <a target="_blank" rel="noopener noreferrer" href="https://forgejo.org">{{ctx.Locale.Tr "powered_by" "Forgejo"}}</a> 3 + {{if ShowFooterPoweredBy}} 4 + <a target="_blank" rel="noopener noreferrer" href="https://forgejo.org">{{ctx.Locale.Tr "powered_by" "Forgejo"}}</a> 5 + {{end}} 4 6 {{if (or .ShowFooterVersion .PageIsAdmin)}} 5 7 {{ctx.Locale.Tr "version"}}: 6 8 {{if .IsAdmin}}