turnkeylinux / tracker

TurnKey Linux Tracker

Home Page:https://www.turnkeylinux.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gitea: can not update logos

alicetails opened this issue · comments

Hi guys! I have gitea setup on VM (no docker) installed from turnkey

I wanna to update logos to custom. According to docs i shall run make generate-images, but there is no makefile, how can i regenerate logos without reinstalling gitea?

I tryed to download gitea repo with makefile and executed make generate-images, it was executed with no errors, but nothing changed

Gitea Version
1.22.0

Git Version
2.20.1

Gitea was installed from TurnKey, rebuild with separate DB and LFS

Hi @alicetails

Apologies I haven't responded sooner. There's currently a lot on behind the scenes.

run make generate-images, but there is no makefile

FWIW that's because we install from binary.

I'm assuming that you are referring to these custom logo instructions. Actually this is the v1.20.x version specific page - although on face value they appear the same in this case...

I haven't done this myself and I don't have an install of our Gitea appliance handy to test. But hopefully this will be enough guidance to get you there.

It sounds like you've generated your images - I'll assume you have. I'll also assume that you haven't changed any of the default config.

So AFAICT, the next step is moving the image files you've generated. As noted in the docs - they need to be moved from the public/img/ dir of the cloned Gitea git repo to the relevant Gitea directory so they can be served. After reading the top of that doc page and checking the default Gitea config file (/etc/gitea/app.ini), I'm pretty sure that the custom dir they are referring to is /home/git/custom.

So I suggest that you try creating a /home/git/custom/public/img/ dir and then copy the images you've generated (as noted in the doc) to that dir. Then restart the gitea service. Note that if you do that as the root user (which is likely) then you'll also need to ensure that they're owned by the git user.

So something like this:

# working from the base dir inside your git clone
mkdir -p /home/git/custom/public/img
cp public/img/*.{png,svg} /home/git/custom/public/img/
chown -R git:git /home/git/custom/public/img
systemctl restart gitea

Hopefully you'll only need to refresh Gitea in your browser for the new logo(s) to show. If not, then you could also try restarting nginx (on your server) and/or doing a hard fresh in your browser (usually Ctrl-f5).

Clearing Gitea related browser cache and cookies probably won't need to be cleared, but worth a try if they still don't update.

Let me know how you go either way.

Good luck! 😁

Hi, @JedMeister ! I solved it another way. I've modified tmpl files and now everything is good. Thank you!