aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-02-14 21:56:17 +0800
committerGitHub <noreply@github.com>2022-02-14 21:56:17 +0800
commit5348e198db6cd84467c99d6741715291b33598a1 (patch)
treea2751d70d91c28210bab60cc826750a7628b7cdd /docs
parentecc3954db01fe8c6ae409564d23b8746e76fdd8c (diff)
downloadgitea-5348e198db6cd84467c99d6741715291b33598a1.tar.gz
gitea-5348e198db6cd84467c99d6741715291b33598a1.zip
Add example to render html files (#18736)
* Add example to render html files * Use class in example Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'docs')
-rw-r--r--docs/content/doc/advanced/external-renderers.en-us.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/content/doc/advanced/external-renderers.en-us.md b/docs/content/doc/advanced/external-renderers.en-us.md
index e5de7e8efd..34329408a1 100644
--- a/docs/content/doc/advanced/external-renderers.en-us.md
+++ b/docs/content/doc/advanced/external-renderers.en-us.md
@@ -103,6 +103,27 @@ Once your configuration changes have been made, restart Gitea to have changes ta
**Note**: Prior to Gitea 1.12 there was a single `markup.sanitiser` section with keys that were redefined for multiple rules, however,
there were significant problems with this method of configuration necessitating configuration through multiple sections.
+### Example: HTML
+
+Render HTML files directly:
+
+```ini
+[markup.html]
+ENABLED = true
+FILE_EXTENSIONS = .html,.htm
+RENDER_COMMAND = cat
+; Input is not a standard input but a file
+IS_INPUT_FILE = true
+
+[markup.sanitizer.html.1]
+ELEMENT = div
+ALLOW_ATTR = class
+
+[markup.sanitizer.html.2]
+ELEMENT = a
+ALLOW_ATTR = class
+```
+
### Example: Office DOCX
Display Office DOCX files with [`pandoc`](https://pandoc.org/):