custom templates #1963

Closed
opened 2025-11-02 04:19:28 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @Dozecloud-llc on GitHub (Jun 22, 2018).

Need help using custom templates.

Originally created by @Dozecloud-llc on GitHub (Jun 22, 2018). Need help using custom templates.
GiteaMirror added the type/question label 2025-11-02 04:19:28 -06:00
Author
Owner

@lunny commented on GitHub (Jun 22, 2018):

Please see https://docs.gitea.io/en-us/customizing-gitea/

@lunny commented on GitHub (Jun 22, 2018): Please see https://docs.gitea.io/en-us/customizing-gitea/
Author
Owner

@Dozecloud-llc commented on GitHub (Jun 22, 2018):

The custom folder does not change anything.

@Dozecloud-llc commented on GitHub (Jun 22, 2018): The custom folder does not change anything.
Author
Owner

@gdiepen commented on GitHub (Jun 22, 2018):

Did you restart gitea after you made changes in the custom folder? From what I understand the changes you make to the templates while gitea is running are not being picked up.

@gdiepen commented on GitHub (Jun 22, 2018): Did you restart gitea after you made changes in the custom folder? From what I understand the changes you make to the templates while gitea is running are not being picked up.
Author
Owner

@Dozecloud-llc commented on GitHub (Jun 22, 2018):

When try do change the footer I get template: custom/footer:7:12: executing "custom/footer" at <{{template "custom/b...>: exceeded maximum template depth (100000)

@Dozecloud-llc commented on GitHub (Jun 22, 2018): When try do change the footer I get template: custom/footer:7:12: executing "custom/footer" at <{{template "custom/b...>: exceeded maximum template depth (100000)
Author
Owner

@Dozecloud-llc commented on GitHub (Jun 22, 2018):

I did restart and nothing changed. When I stated the server it started to work.

@Dozecloud-llc commented on GitHub (Jun 22, 2018): I did restart and nothing changed. When I stated the server it started to work.
Author
Owner

@techknowlogick commented on GitHub (Jun 22, 2018):

@jsargent7089 are you putting the contents of templates/base/footer.tmpl into templates/custom/footer.tmpl? because that sounds like a recursion issue.

Edit: do you see {{template "custom/footer" .}} near the last line of your template?

@techknowlogick commented on GitHub (Jun 22, 2018): @jsargent7089 are you putting the contents of `templates/base/footer.tmpl` into `templates/custom/footer.tmpl`? because that sounds like a recursion issue. Edit: do you see `{{template "custom/footer" .}}` near the last line of your template?
Author
Owner

@bkraul commented on GitHub (Jul 25, 2018):

Question, why was this issue closed? Was there an actual resolution to the issue? Or was it because the reporter did not respond?

I have the very same questions, and nothing I have tried has worked. I have read the document thoroughly, and nothing seems to work. I think we need clarification as to where this custom folder is to be placed.

I am using the docker implementation of gitea, and have tried a number of locations for the custom folder, but none seem to be picked up by gitea. I had a similar issue with labels a while back and sorted it out by looking at source. Haven't been that lucky with templates so far.

@bkraul commented on GitHub (Jul 25, 2018): Question, why was this issue closed? Was there an actual resolution to the issue? Or was it because the reporter did not respond? I have the very same questions, and nothing I have tried has worked. I have read the document thoroughly, and nothing seems to work. I think we need clarification as to where this **custom** folder is to be placed. I am using the docker implementation of gitea, and have tried a number of locations for the custom folder, but none seem to be picked up by gitea. I had a similar issue with labels a while back and sorted it out by looking at source. Haven't been that lucky with templates so far.
Author
Owner

@lafriks commented on GitHub (Jul 25, 2018):

@bkraul questions should be asked in Gitea forum - https://discourse.gitea.io/

As for custom folder it specified in GITEA_CUSTOM variable or by default it is $GITEA_WORK_DIR/custom

Custom templates need to be placed in $GITEA_CUSTOM/custom/templates/custom/ directory

@lafriks commented on GitHub (Jul 25, 2018): @bkraul questions should be asked in Gitea forum - https://discourse.gitea.io/ As for custom folder it specified in `GITEA_CUSTOM` variable or by default it is `$GITEA_WORK_DIR/custom` Custom templates need to be placed in `$GITEA_CUSTOM/custom/templates/custom/` directory
Author
Owner

@bkraul commented on GitHub (Jul 25, 2018):

Thanks @lafriks . Will go there for further questions.

@bkraul commented on GitHub (Jul 25, 2018): Thanks @lafriks . Will go there for further questions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1963