1
0
Fork 0
forked from forgejo/forgejo

Remove RequireHighlightJS field, update plantuml example. (#19615)

This commit is contained in:
wxiaoguang 2022-05-05 15:53:38 +08:00 committed by GitHub
parent 5a75a5463e
commit 7b089c465d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 10 additions and 28 deletions

View file

@ -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: