[x]):Adding a custom template under custom/templates doesn't work.
Thomas Boerger @tboerger 14:29
let me check the macaron renderer source
looks like we need to implement a custom TemplateFileSystem because AppendDirectories gets ignored by the bindata based TemplateFileSystem from https://github.com/go-macaron/bindata
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
For reference, this was known before the bug was introduced here:
https://github.com/go-gitea/gitea/pull/314#issuecomment-265191763
Should be only when bindata build tag is used.
Just curious, if we are using the download from the "master" directory here: https://dl.gitea.io/gitea/master/ are custom templates expected to work? I'm a little lost with the dialog as to if the issue has been resolved or if it's still pending. Thanks!
Issue is still pending for builds with 'bindata' tag.
The downloads from dl.gitea.io are of this kind (so broken).
I guess it would help to include the build tags in the version
string as printed by some footers, btw.
I actually was just coming back to edit my first post haha. I just realized the difference between bindata builds and non-bindata builds by RTFM and get it now, thanks for the quick response though!
We will resolve this issue for 1.1
@tboerger any update?
I will work on this within this week hopefully, but let's stop backporting that.
resolved by #1087
Hi,
templates still not working for me. I've installed GiTea from Binaries (v1.2.3)
@Wikiki Could you test v1.3.0-rc1? (After creating a backup of course). Since templates works just fine on https://try.gitea.io
Hi @tboerger, I tried yesterday with 1.3 and its working :smiley:
Sorry for the noise, my mistake. Changing a template requires restarting gitea. I tried v1.4.0 again and my changed template is working there two now!
Is this working? I just installed v1.4.0 and am trying a customization of the splash page. I assume this should be
custom/templates/home.tmpl. I created the file and made a change but nothing happens.Just a note to add, I installed v1.3.3 and templated worked as expected. I just do not know if switching (downgrading) from v1.4.0 to v1.3.3 will break anything. I just ran the new (older) binary without making any other changes.
One last note, downloaded the binary from the binary downloads page.
This still doesn't seem to work with 1.4.1.
I've added a /custom/templates/custom directory along with the header.tmpl as explained here:
https://docs.gitea.io/en-us/customizing-gitea/
as to how to add custom CSS. I doesn't seem to do anything.
It would be helpful to have the documentation updated to better explain how to use custom CSS and Javascript.
As it stands that is very unclear.
It appears you are supposed to copy the existing *.tmpl files to the custom/templates directory and then edit them, but the home.tmpl, for example is in German, so that doesn't really help.
And even so, if that's the case - it doesn't work because my Gitea home page is still in English.
Running Windows Service with home.tmpl taken from master branch gives the error as following:

Use template from correct version branch
Most helpful comment
I will work on this within this week hopefully, but let's stop backporting that.