Browse Source

Reduce overhead of upgrades for users with custom stylesheets/JS (#3051)

for-closed-social
techknowlogick 7 years ago
committed by Lauris BH
parent
commit
b0971ae37c
5 changed files with 4 additions and 0 deletions
  1. +2
    -0
      docs/content/doc/advanced/customizing-gitea.en-us.md
  2. +1
    -0
      templates/base/footer.tmpl
  3. +1
    -0
      templates/base/head.tmpl
  4. +0
    -0
     
  5. +0
    -0
     

+ 2
- 0
docs/content/doc/advanced/customizing-gitea.en-us.md View File

@ -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.
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.
Place your own files in corresponding sub-folder under `custom/options`.

+ 1
- 0
templates/base/footer.tmpl View File

@ -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 "custom/footer" .}}
</body>
</html>

+ 1
- 0
templates/base/head.tmpl View File

@ -122,6 +122,7 @@
<meta property="og:url" content="{{AppUrl}}" />
<meta property="og:description" content="{{MetaDescription}}">
{{end}}
{{template "custom/header" .}}
</head>
<body>
<div class="full height">

+ 0
- 0
View File


+ 0
- 0
View File


Loading…
Cancel
Save