-
-
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
Reduce overhead of upgrades for users with custom stylesheets/JS #3051
Reduce overhead of upgrades for users with custom stylesheets/JS #3051
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3051 +/- ##
==========================================
- Coverage 33.43% 33.41% -0.03%
==========================================
Files 270 270
Lines 39553 39553
==========================================
- Hits 13226 13216 -10
- Misses 24441 24447 +6
- Partials 1886 1890 +4
Continue to review full report at Codecov.
|
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.
A little change needed and add 2-3 lines (in https://github.com/go-gitea/gitea/blob/master/docs/content/doc/advanced/customizing-gitea.en-us.md) recommending to use extra folder to add some custom header and footer resources to keep template updated.
templates/base/footer.tmpl
Outdated
@@ -66,5 +66,6 @@ | |||
<!-- JavaScript --> | |||
<script src="{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.js"></script> | |||
<script src="{{AppSubUrl}}/js/index.js?v={{MD5 AppVer}}"></script> | |||
{{template "base/footer_extras" .}} |
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.
Cleaner to create a folder extra at root of templates containing footer.tmpl and header.tmpl.
@sapk thanks for the feedback. I've changed the directory for the extras template files, and added in some documentation on when to use them. |
LGTM |
Would |
@ethantkoenig Thanks for feedback. As |
@techknowlogick Could we explicitly tell them to go to |
@ethantkoenig yes, but then for the other custom directory we have to explicitly say not the However, this is as much commitment to the idea of that folder name as I have, and so in light of the above if you still want me to change the directory name I will. |
I personally prefer
|
Ok. Sounds good. Im out right now, but will change it when I get home.
|
@ethantkoenig I've updated it. Thanks again for the feedback. cc: @lafriks |
LGTM |
I have custom JS/CSS in use on my gitea instance and when I upgrade I have to edit head.tmpl and footer.tmpl to add in my changes again (otherwise I might have out of date templates). This will allow me to put all of my changes in header_extras.tmpl/footer_extras.tmpl and not worry about upgrading.
Open to suggestions regarding the names of the additional templates, or their locations.