aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/doc/advanced/customizing-gitea.en-us.md
diff options
context:
space:
mode:
authorPatrick Schratz <patrick.schratz@gmail.com>2020-12-09 07:47:06 +0100
committerGitHub <noreply@github.com>2020-12-09 07:47:06 +0100
commitaf79677a44aec3924823d90f42e5cc2e6e1b2961 (patch)
treeed84af9ce17ff0f1337984b99f60d20541adf3da /docs/content/doc/advanced/customizing-gitea.en-us.md
parent97ab820accba40de66d7df7cdc5e396277483710 (diff)
downloadgitea-af79677a44aec3924823d90f42e5cc2e6e1b2961.tar.gz
gitea-af79677a44aec3924823d90f42e5cc2e6e1b2961.zip
Reformat docs (#13897)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'docs/content/doc/advanced/customizing-gitea.en-us.md')
-rw-r--r--docs/content/doc/advanced/customizing-gitea.en-us.md66
1 files changed, 40 insertions, 26 deletions
diff --git a/docs/content/doc/advanced/customizing-gitea.en-us.md b/docs/content/doc/advanced/customizing-gitea.en-us.md
index 718e3c6d99..118d5f2e68 100644
--- a/docs/content/doc/advanced/customizing-gitea.en-us.md
+++ b/docs/content/doc/advanced/customizing-gitea.en-us.md
@@ -45,7 +45,7 @@ environment variable; this can be used to override the default path to something
**Note:** Gitea must perform a full restart to see configuration changes.
-# Table of Contents
+**Table of Contents**
{{< toc >}}
@@ -127,8 +127,8 @@ copy javascript files from https://gitea.com/davidsvantesson/plantuml-code-highl
<script src="https://your-server.com/encode.js"></script>
<script src="https://your-server.com/plantuml_codeblock_parse.js"></script>
<script>
-<!-- Replace call with address to your plantuml server-->
-parsePlantumlCodeBlocks("http://www.plantuml..com/plantuml")
+ <!-- Replace call with address to your plantuml server-->
+ parsePlantumlCodeBlocks("http://www.plantuml..com/plantuml");
</script>
{{end}}
```
@@ -148,38 +148,50 @@ The script will detect tags with `class="language-plantuml"`, but you can change
#### Example: STL Preview
You can display STL file directly in Gitea by adding:
+
```html
<script>
-function lS(src){
- return new Promise(function(resolve, reject) {
- let s = document.createElement('script')
- s.src = src
- s.addEventListener('load', () => {
- resolve()
- })
- document.body.appendChild(s)
- });
-}
-
-if($('.view-raw>a[href$=".stl" i]').length){
- $('body').append('<link href="/Madeleine.js/src/css/Madeleine.css" rel="stylesheet">');
- Promise.all([lS("/Madeleine.js/src/lib/stats.js"),lS("/Madeleine.js/src/lib/detector.js"), lS("/Madeleine.js/src/lib/three.min.js"), lS("/Madeleine.js/src/Madeleine.js")]).then(function() {
- $('.view-raw').attr('id', 'view-raw').attr('style', 'padding: 0;margin-bottom: -10px;');
- new Madeleine({
- target: 'view-raw',
- data: $('.view-raw>a[href$=".stl" i]').attr('href'),
- path: '/Madeleine.js/src'
+ function lS(src) {
+ return new Promise(function (resolve, reject) {
+ let s = document.createElement("script");
+ s.src = src;
+ s.addEventListener("load", () => {
+ resolve();
+ });
+ document.body.appendChild(s);
});
- $('.view-raw>a[href$=".stl"]').remove()
- });
-}
+ }
+
+ if ($('.view-raw>a[href$=".stl" i]').length) {
+ $("body").append(
+ '<link href="/Madeleine.js/src/css/Madeleine.css" rel="stylesheet">'
+ );
+ Promise.all([
+ lS("/Madeleine.js/src/lib/stats.js"),
+ lS("/Madeleine.js/src/lib/detector.js"),
+ lS("/Madeleine.js/src/lib/three.min.js"),
+ lS("/Madeleine.js/src/Madeleine.js"),
+ ]).then(function () {
+ $(".view-raw")
+ .attr("id", "view-raw")
+ .attr("style", "padding: 0;margin-bottom: -10px;");
+ new Madeleine({
+ target: "view-raw",
+ data: $('.view-raw>a[href$=".stl" i]').attr("href"),
+ path: "/Madeleine.js/src",
+ });
+ $('.view-raw>a[href$=".stl"]').remove();
+ });
+ }
</script>
```
+
to the file `templates/custom/footer.tmpl`
You also need to download the content of the library [Madeleine.js](https://jinjunho.github.io/Madeleine.js/) and place it under `custom/public/` folder.
You should end-up with a folder structucture similar to:
+
```
custom/templates
-- custom
@@ -267,7 +279,7 @@ To add a custom license, add a file with the license text to `custom/options/lic
Locales are managed via our [crowdin](https://crowdin.com/project/gitea).
You can override a locale by placing an altered locale file in `custom/options/locale`.
-Gitea's default locale files can be found in the [`options/locale`](https://github.com/go-gitea/gitea/tree/master/options/locale) source folder and these should be used as examples for your changes.
+Gitea's default locale files can be found in the [`options/locale`](https://github.com/go-gitea/gitea/tree/master/options/locale) source folder and these should be used as examples for your changes.
To add a completely new locale, as well as placing the file in the above location, you will need to add the new lang and name to the `[i18n]` section in your `app.ini`. Keep in mind that Gitea will use those settings as **overrides**, so if you want to keep the other languages as well you will need to copy/paste the default values and add your own to them.
@@ -289,10 +301,12 @@ currently there are `{Name}` (name of repository), `{Description}`, `{CloneURL.S
### Reactions
To change reaction emoji's you can set allowed reactions at app.ini
+
```
[ui]
REACTIONS = +1, -1, laugh, confused, heart, hooray, eyes
```
+
A full list of supported emoji's is at [emoji list](https://gitea.com/gitea/gitea.com/issues/8)
## Customizing the look of Gitea