forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For feature parity with GitLab. Tested in files, issues, wiki, editor. arc-green only does an inversion because the renderer seems to like to render white backgrounds on boxes. Ref: go-gitea#3340 Fixes: go-gitea#12307
- Loading branch information
1 parent
415fc82
commit 367a234
Showing
9 changed files
with
518 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,45 +108,6 @@ Apart from `extra_links.tmpl` and `extra_tabs.tmpl`, there are other useful temp | |
- `body_outer_post.tmpl`, before the bottom `<footer>` element. | ||
- `footer.tmpl`, right before the end of the `<body>` tag, a good place for additional Javascript. | ||
|
||
#### Example: Mermaid.js | ||
|
||
If you would like to add [mermaid.js](https://mermaid-js.github.io/mermaid) support to Gitea's markdown you simply add: | ||
|
||
```html | ||
{{if .RequireHighlightJS}} | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
<!-- or wherever you have placed it --> | ||
<script>mermaid.init(".language-mermaid")</script> | ||
{{end}} | ||
``` | ||
|
||
to `custom/footer.tmpl`. You then can add blocks | ||
like below to your markdown: | ||
|
||
```mermaid | ||
stateDiagram | ||
[*] --> Active | ||
|
||
state Active { | ||
[*] --> NumLockOff | ||
NumLockOff --> NumLockOn : EvNumLockPressed | ||
NumLockOn --> NumLockOff : EvNumLockPressed | ||
-- | ||
[*] --> CapsLockOff | ||
CapsLockOff --> CapsLockOn : EvCapsLockPressed | ||
CapsLockOn --> CapsLockOff : EvCapsLockPressed | ||
-- | ||
[*] --> ScrollLockOff | ||
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed | ||
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed | ||
} | ||
``` | ||
|
||
If you want to use Mermaid.js outside of markdown, e.g. in other templates or HTML files, | ||
you would need to remove `{{if .RequireHighlightJS}}` and `{{end}}`. | ||
|
||
Mermaid will detect and use tags with `class="language-mermaid"`. | ||
|
||
#### Example: PlantUML | ||
|
||
You can add [PlantUML](https://plantuml.com/) support to Gitea's markdown by using a PlantUML server. | ||
|
Oops, something went wrong.