-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Templates for extra links in top navbar and repo tool tabs. #3308
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3308 +/- ##
=========================================
Coverage ? 35.03%
=========================================
Files ? 280
Lines ? 40559
Branches ? 0
=========================================
Hits ? 14211
Misses ? 24242
Partials ? 2106 Continue to review full report at Codecov.
|
Please place them under custom folder |
Sure, no problem. Is it fine if the tmpl files do not exist by default? Please note that both "extra_tabs.tmpl" files are just placeholders, with their content commented out so they have no effect. The real ones go indeed into "custom/templates/". |
I think at least empty files must exist |
All right, I've made both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlbertoGP I think @lafriks meant for you to put templates in the custom folder in the templates dir (so custom/templates/custom
). The templates shouldn't go into base
folder.
See #3051 as an example of how this has been done already. Also you can see #3286
Oh, I see now, thanks! |
c833f07
to
71522ae
Compare
Could you also add info about this in gitea customization docs? |
Yes, of course: I tried doing that, but got blocked by "Documentation build: Partial "header.html" not found #3306". |
CI fail seems to be unrelated. LGTM |
9a170f1
to
a9c3650
Compare
@@ -51,6 +51,8 @@ Any statement contained inside `{{` and `}}` are Gitea templete's syntax and sho | |||
|
|||
To add in custom HTML to the header or the footer of the page, in the `templates/custom` directory there are `header.tmpl` and `footer.tmpl` that can be modified. This is useful if you want to add in custom CSS files, or additional Javascript. | |||
|
|||
If all you want is to add extra links to the top navigation bar, or extra tabs to the repository view, you can put them in `templates/custom/extra_links.tmpl` and `templates/custom/extra_tabs.tmpl` inside your `custom/` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change to:
you can put them in extra_links.tmpl
and extra_tabs.tmpl
inside your templates/custom
directory
These templates add content to the top navbar and to the repository page. This way we do not have to copy and modify the whole template, and re-modify it after upgrading Gitea if it changes. Signed-off-by: Alberto González Palomo <bugs@sentido-labs.com>
@techknowlogick needs your approval |
@lafriks thanks for the ping. approved. |
These templates add content to the top navbar and to the repository page.
This way we do not have to copy and modify the whole template, and re-modify it after upgrading Gitea if
it changes.
I'll put a comment with more details under "Custom tabs for projects in web ui #1199".
This fixes "Custom tabs for projects in web ui #1199", and the intention of "Custom Routing / new Pages?! #2115" (but without routing changes).