#114 Contributing: How to add themes to Codeberg?

Open
opened 2 months ago by fnetX · 10 comments
fnetX commented 2 months ago
Collaborator

Hey there,

new and improved themes for Codeberg is an often requested feature, see

But no one ever started working on it, likely because there was never mentioned how to actually do this. I didn't find anything in all these issue threads, nor in the gitea docs, not really.

Please, if anyone knows how to add themes to Codeberg, add this to the Docs under "Contributing to Codeberg" (or point to the stuff in the gitea docs). I think this might be a milestone for the community if people know how to contribute themes, where to file the PR (Codeberg/gitea or Codeberg/build-deploy-gitea) etc ... since it was apparently never done before there's no reference point.

Thank you.

PS: I also found some gitea-themes on codeberg, like https://codeberg.org/vrifox/gitea-theme

Hey there, new and improved themes for Codeberg is an often requested feature, see - Codeberg/Community#393 (new off-white colour theme) - Codeberg/Community#392 (improvements to arc-green) - Codeberg/Community#278 (effectively requesting themes) - Codeberg/Community#276 (general request for new themes, also contains some notes on how to do it) - Codeberg/Community#74 (not directly related, but is more likely to be implemented with proper docs) - Codeberg/Community#59 (request for more themes, links to https://gitea.com/gitea/awesome-gitea#user-content-themes but does not mention how to actually include them) But no one ever started working on it, likely because there was never mentioned *how to actually do this*. I didn't find anything in all these issue threads, nor in the gitea docs, not really. Please, if anyone knows how to add themes to Codeberg, add this to the Docs under "Contributing to Codeberg" (or point to the stuff in the gitea docs). I think this might be a milestone for the community if people know how to contribute themes, where to file the PR (Codeberg/gitea or Codeberg/build-deploy-gitea) etc ... since it was apparently never done before there's no reference point. Thank you. PS: I also found some gitea-themes on codeberg, like https://codeberg.org/vrifox/gitea-theme
hw commented 2 months ago
Owner

That would be simply a PR to either our codeberg branch for gitea in https://codeberg.org/codeberg/gitea, or to the deployment repo if it is going to be deployed as add-on: https://codeberg.org/codeberg/build-deploy-gitea/.

That would be simply a PR to either our codeberg branch for gitea in https://codeberg.org/codeberg/gitea, or to the deployment repo if it is going to be deployed as add-on: https://codeberg.org/codeberg/build-deploy-gitea/.
fnetX commented 2 months ago
Poster
Collaborator

... the "or" is often quite confusing to me. And this doesn't answer the question of where to put the files inside, that's my main question.

... the "or" is often quite confusing to me. And this doesn't answer the question of where to put the files inside, that's my main question.
fnetX commented 2 months ago
Poster
Collaborator

Best thing might be to include the themes as git submodules to have them automatically update from their upstreams ... but I don't see a folder this would fit in ...

Best thing might be to include the themes as git submodules to have them automatically update from their upstreams ... but I don't see a folder this would fit in ...
hw commented 2 months ago
Owner

Guess nobody has looked into pros and cons of either approach yet, so whoever would like to take over responsibility for Codeberg themes has the power to weigh and decide ;)

Guess nobody has looked into pros and cons of either approach yet, so whoever would like to take over responsibility for Codeberg themes has the power to weigh and decide ;)
hw commented 2 months ago
Owner

Best thing might be to include the themes as git submodules to have them automatically update from their upstreams ... but I don't see a folder this would fit in ...

Manual review is mandatory here for security reasons.

> Best thing might be to include the themes as git submodules to have them automatically update from their upstreams ... but I don't see a folder this would fit in ... Manual review is mandatory here for security reasons.
fnetX commented 2 months ago
Poster
Collaborator

Manual review is mandatory here for security reasons.

Which is possible with git submodules when always checking out a specific commit. Still easier than pushing everything from repo 1 to repo 2 after every update ...

Still the open question: Where should the files appear in the file trees? Even if I decide to put this into Codeberg/gitea, I still have no clue where! That's what I'm asking.

> Manual review is mandatory here for security reasons. Which is possible with git submodules when always checking out a specific commit. Still easier than pushing everything from repo 1 to repo 2 after every update ... Still the open question: Where should the files appear in the file trees? Even if I decide to put this into Codeberg/gitea, I still have no clue where! That's what I'm asking.
hw commented 2 months ago
Owner

Never done this before, skimming through the readmes of some examples above suggests that the files are just copied/overlaid into etc/gitea/public/ and etc/gitea/templates? Somes some attention is required to not overwrite/conflict with the default files.

Never done this before, skimming through the readmes of some examples above suggests that the files are just copied/overlaid into `etc/gitea/public/` and `etc/gitea/templates`? Somes some attention is required to not overwrite/conflict with the default files.
fnetX commented 2 months ago
Poster
Collaborator

well, I throw this into the pot ... it's apparently the place where to put themes, I'm not sure if that's it (+ adding it to the app.ini), or if you have to do some more magic ...
https://github.com/go-gitea/gitea/tree/master/web_src/less/themes

well, I throw this into the pot ... it's apparently the place where to put themes, I'm not sure if that's it (+ adding it to the app.ini), or if you have to do some more magic ... https://github.com/go-gitea/gitea/tree/master/web_src/less/themes
hw commented 2 months ago
Owner

cc: @6543

is this documented somewhere?

cc: @6543 is this documented somewhere?
6543 commented 2 months ago

@fnetX @hw an example: https://github.com/TylerByte666/gitea-matrix-template#how-to-use

<custom root>/public/css/theme-<theme_name>.css

@fnetX @hw an example: https://github.com/TylerByte666/gitea-matrix-template#how-to-use `<custom root>/public/css/theme-<theme_name>.css`
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.