Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from Apr 3, 2024

Conversation

Yakov5776
Copy link
Contributor

@Yakov5776 Yakov5776 commented Apr 2, 2024

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

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 2, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 2, 2024
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Apr 2, 2024
@Yakov5776
Copy link
Contributor Author

could we entertain the idea of migrating this and other config options like ShowFooterVersion to a runtime option?

@silverwind
Copy link
Member

silverwind commented Apr 2, 2024

Actually I think these are exposed as runtime options already with some automatic key mapping, please try if SHOW_FOOTER_POWERED_BY = false in the ini has any effect.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[other]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Show version information about Gitea and Go in the footer
;SHOW_FOOTER_VERSION = true
;; Show template execution time in the footer
;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
;; Generate sitemap. Defaults to `true`.
;ENABLE_SITEMAP = true
;; Enable/Disable RSS/Atom feed
;ENABLE_FEED = true

If that works, add the documentation in:

  • custom/conf/app.example.ini
  • docs/content/administration/config-cheat-sheet.en-us.md
  • docs/content/administration/config-cheat-sheet.zh-cn.md (can use machine translation like https://translate.google.com/)

@jolheiser
Copy link
Member

Correct, these should be controllable by editing the config with this PR's changes.

@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 3, 2024
@Yakov5776
Copy link
Contributor Author

tested, it works as intended.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 3, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 3, 2024
@delvh delvh changed the title Hide powered_by via OtherConfig flag Add [other].SHOW_FOOTER_POWERED_BY setting to hide Powered by Apr 3, 2024
@jolheiser jolheiser added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 3, 2024
@jolheiser jolheiser enabled auto-merge (squash) April 3, 2024 15:35
@jolheiser jolheiser merged commit 609a627 into go-gitea:main Apr 3, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Apr 3, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 3, 2024
@techknowlogick techknowlogick added the type/enhancement An improvement of existing functionality label Apr 3, 2024
AvengerMoJo pushed a commit to AvengerMoJo/gitea that referenced this pull request Apr 8, 2024
…-gitea#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>
@wxiaoguang wxiaoguang modified the milestones: 1.23.0, 1.22.0 Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/docs modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants