summaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content')
-rw-r--r--docs/content/doc/advanced/customizing-gitea.en-us.md17
1 files changed, 10 insertions, 7 deletions
diff --git a/docs/content/doc/advanced/customizing-gitea.en-us.md b/docs/content/doc/advanced/customizing-gitea.en-us.md
index 1a8386fc3e..ef798ddbf9 100644
--- a/docs/content/doc/advanced/customizing-gitea.en-us.md
+++ b/docs/content/doc/advanced/customizing-gitea.en-us.md
@@ -132,15 +132,18 @@ copy javascript files from https://gitea.com/davidsvantesson/plantuml-code-highl
`$GITEA_CUSTOM/public` folder. Then add the following to `custom/footer.tmpl`:
```html
-{{if .RequireHighlightJS}}
-<script src="https://your-server.com/deflate.js"></script>
-<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");
+ $(async () => {
+ if (!$('.language-plantuml').length) return;
+ await Promise.all([
+ $.getScript('https://your-server.com/deflate.js'),
+ $.getScript('https://your-server.com/encode.js'),
+ $.getScript('https://your-server.com/plantuml_codeblock_parse.js'),
+ ]);
+ // Replace call with address to your plantuml server
+ parsePlantumlCodeBlocks("https://www.plantuml.com/plantuml");
+ });
</script>
-{{end}}
```
You can then add blocks like the following to your markdown: