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

Custom templates doesn't work #529

Closed
2 of 6 tasks
gdudas opened this issue Dec 29, 2016 · 15 comments
Closed
2 of 6 tasks

Custom templates doesn't work #529

gdudas opened this issue Dec 29, 2016 · 15 comments
Assignees
Labels
Milestone

Comments

@gdudas
Copy link

gdudas commented Dec 29, 2016

  • Gitea version (or commit ref): v1.0.0+34-gac51caa
  • Git version: 2.8.3
  • Operating system: Linux amd64
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

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!](https://www.bountysource.com/issues/40471993-custom-templates-doesn-t-work?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github).
@lunny lunny added this to the 1.1.0 milestone Dec 29, 2016
@lunny lunny added the type/bug label Dec 29, 2016
@strk
Copy link
Member

strk commented Dec 29, 2016

For reference, this was known before the bug was introduced here:
#314 (comment)

Should be only when bindata build tag is used.

@esell
Copy link
Contributor

esell commented Jan 12, 2017

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!

@strk
Copy link
Member

strk commented Jan 12, 2017 via email

@esell
Copy link
Contributor

esell commented Jan 12, 2017

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!

@tboerger
Copy link
Member

We will resolve this issue for 1.1

@lunny
Copy link
Member

lunny commented Feb 11, 2017

@tboerger any update?

@tboerger
Copy link
Member

I will work on this within this week hopefully, but let's stop backporting that.

@lunny
Copy link
Member

lunny commented Mar 1, 2017

resolved by #1087

@lunny lunny closed this as completed Mar 1, 2017
@Wikiki
Copy link

Wikiki commented Nov 15, 2017

Hi,

templates still not working for me. I've installed GiTea from Binaries (v1.2.3)

@bkcsoft
Copy link
Member

bkcsoft commented Nov 23, 2017

@Wikiki Could you test v1.3.0-rc1? (After creating a backup of course). Since templates works just fine on https://try.gitea.io

@Wikiki
Copy link

Wikiki commented Nov 23, 2017

Hi @tboerger, I tried yesterday with 1.3 and its working 😃

@adilinden
Copy link

adilinden commented Apr 2, 2018

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.

@methodbox
Copy link

methodbox commented May 28, 2018

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.

@imPrashik
Copy link

Running Windows Service with home.tmpl taken from master branch gives the error as following:

image

@lafriks
Copy link
Member

lafriks commented May 16, 2020

Use template from correct version branch

@go-gitea go-gitea locked as resolved and limited conversation to collaborators May 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests