summaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-05-05 15:53:38 +0800
committerGitHub <noreply@github.com>2022-05-05 10:53:38 +0300
commit7b089c465d9f851454be91ca209ab26782648a45 (patch)
treedee38550f07722136028d173ab8a6cdef1546b50 /docs/content
parent5a75a5463e647e6783a973650d3306978ce56c57 (diff)
downloadgitea-7b089c465d9f851454be91ca209ab26782648a45.tar.gz
gitea-7b089c465d9f851454be91ca209ab26782648a45.zip
Remove `RequireHighlightJS` field, update plantuml example. (#19615)
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: