Skip to content

Commit 01eb465

Browse files
authored
Fix PlantUML example in document (#21142)
The document was written before Gitea 1.15. Now Gitea uses `/assets` sub-directory (#15219). Close #21023 * #21023
1 parent 24b5a38 commit 01eb465

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/content/doc/advanced/customizing-gitea.en-us.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -121,25 +121,25 @@ Apart from `extra_links.tmpl` and `extra_tabs.tmpl`, there are other useful temp
121121
- `body_inner_pre.tmpl`, before the top navigation bar, but already inside the main container `<div class="full height">`.
122122
- `body_inner_post.tmpl`, before the end of the main container.
123123
- `body_outer_post.tmpl`, before the bottom `<footer>` element.
124-
- `footer.tmpl`, right before the end of the `<body>` tag, a good place for additional Javascript.
124+
- `footer.tmpl`, right before the end of the `<body>` tag, a good place for additional JavaScript.
125125

126126
#### Example: PlantUML
127127

128128
You can add [PlantUML](https://plantuml.com/) support to Gitea's markdown by using a PlantUML server.
129129
The data is encoded and sent to the PlantUML server which generates the picture. There is an online
130130
demo server at http://www.plantuml.com/plantuml, but if you (or your users) have sensitive data you
131131
can set up your own [PlantUML server](https://plantuml.com/server) instead. To set up PlantUML rendering,
132-
copy javascript files from https://gitea.com/davidsvantesson/plantuml-code-highlight and put them in your
132+
copy JavaScript files from https://gitea.com/davidsvantesson/plantuml-code-highlight and put them in your
133133
`$GITEA_CUSTOM/public` folder. Then add the following to `custom/footer.tmpl`:
134134

135135
```html
136136
<script>
137137
$(async () => {
138138
if (!$('.language-plantuml').length) return;
139139
await Promise.all([
140-
$.getScript('https://your-server.com/deflate.js'),
141-
$.getScript('https://your-server.com/encode.js'),
142-
$.getScript('https://your-server.com/plantuml_codeblock_parse.js'),
140+
$.getScript('https://your-gitea-server.com/assets/deflate.js'),
141+
$.getScript('https://your-gitea-server.com/assets/encode.js'),
142+
$.getScript('https://your-gitea-server.com/assets/plantuml_codeblock_parse.js'),
143143
]);
144144
// Replace call with address to your plantuml server
145145
parsePlantumlCodeBlocks("https://www.plantuml.com/plantuml");

0 commit comments

Comments
 (0)