mirror of
https://github.com/go-gitea/gitea
synced 2024-11-28 11:12:55 +01:00
Reduce overhead of upgrades for users with custom stylesheets/JS (#3051)
This commit is contained in:
parent
4947cfb7b0
commit
b0971ae37c
5 changed files with 4 additions and 0 deletions
|
@ -49,6 +49,8 @@ When you find the correct .tmpl file, you need to copy it in the `custom/templat
|
||||||
You can now customize the template you copied in `custom/templates`, being carefully to not break the Gitea syntax.
|
You can now customize the template you copied in `custom/templates`, being carefully to not break the Gitea syntax.
|
||||||
Any statement contained inside `{{` and `}}` are Gitea templete's syntax and shouldn't be touch, unless you know what are you doing.
|
Any statement contained inside `{{` and `}}` are Gitea templete's syntax and shouldn't be touch, unless you know what are you doing.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
## Customizing gitignores, labels, licenses, locales, and readmes.
|
## Customizing gitignores, labels, licenses, locales, and readmes.
|
||||||
|
|
||||||
Place your own files in corresponding sub-folder under `custom/options`.
|
Place your own files in corresponding sub-folder under `custom/options`.
|
|
@ -66,5 +66,6 @@
|
||||||
<!-- JavaScript -->
|
<!-- JavaScript -->
|
||||||
<script src="{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.js"></script>
|
<script src="{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.js"></script>
|
||||||
<script src="{{AppSubUrl}}/js/index.js?v={{MD5 AppVer}}"></script>
|
<script src="{{AppSubUrl}}/js/index.js?v={{MD5 AppVer}}"></script>
|
||||||
|
{{template "custom/footer" .}}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -122,6 +122,7 @@
|
||||||
<meta property="og:url" content="{{AppUrl}}" />
|
<meta property="og:url" content="{{AppUrl}}" />
|
||||||
<meta property="og:description" content="{{MetaDescription}}">
|
<meta property="og:description" content="{{MetaDescription}}">
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{template "custom/header" .}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="full height">
|
<div class="full height">
|
||||||
|
|
0
templates/custom/footer.tmpl
Normal file
0
templates/custom/footer.tmpl
Normal file
0
templates/custom/header.tmpl
Normal file
0
templates/custom/header.tmpl
Normal file
Loading…
Reference in a new issue