Skip to content

Commit 5348e19

Browse files
lunnyzeripath
andauthored
Add example to render html files (#18736)
* Add example to render html files * Use class in example Co-authored-by: zeripath <[email protected]>
1 parent ecc3954 commit 5348e19

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/content/doc/advanced/external-renderers.en-us.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,27 @@ Once your configuration changes have been made, restart Gitea to have changes ta
103103
**Note**: Prior to Gitea 1.12 there was a single `markup.sanitiser` section with keys that were redefined for multiple rules, however,
104104
there were significant problems with this method of configuration necessitating configuration through multiple sections.
105105

106+
### Example: HTML
107+
108+
Render HTML files directly:
109+
110+
```ini
111+
[markup.html]
112+
ENABLED = true
113+
FILE_EXTENSIONS = .html,.htm
114+
RENDER_COMMAND = cat
115+
; Input is not a standard input but a file
116+
IS_INPUT_FILE = true
117+
118+
[markup.sanitizer.html.1]
119+
ELEMENT = div
120+
ALLOW_ATTR = class
121+
122+
[markup.sanitizer.html.2]
123+
ELEMENT = a
124+
ALLOW_ATTR = class
125+
```
126+
106127
### Example: Office DOCX
107128

108129
Display Office DOCX files with [`pandoc`](https://pandoc.org/):

0 commit comments

Comments
 (0)