diff --git a/docs/_static/css/site.scss b/docs/_static/css/site.scss index 99a7b23..9c64a10 100644 --- a/docs/_static/css/site.scss +++ b/docs/_static/css/site.scss @@ -350,6 +350,10 @@ main { margin-left: 1.2em; } + dl { + margin-bottom: 0.4em; + } + .admonition { p + p { diff --git a/docs/docs/configuration/server.rst b/docs/docs/configuration/server.rst index de9ded7..13507b7 100644 --- a/docs/docs/configuration/server.rst +++ b/docs/docs/configuration/server.rst @@ -221,6 +221,37 @@ reply-to-self Do not forget to configure the client. +Markup +------ + +Customize markup and sanitized HTML. Currently, only Markdown (via Misaka) is +supported, but new languages are relatively easy to add. + +.. code-block:: ini + + [markup] + options = strikethrough, superscript, autolink + allowed-elements = + allowed-attributes = + +options + `Misaka-specific Markdown extensions `_, all + flags starting with `EXT_` can be used there, separated by comma. + +allowed-elements + Additional HTML tags to allow in the generated output, comma-separated. By + default, only *a*, *blockquote*, *br*, *code*, *del*, *em*, *h1*, *h2*, + *h3*, *h4*, *h5*, *h6*, *hr*, *ins*, *li*, *ol*, *p*, *pre*, *strong*, + *table*, *tbody*, *td*, *th*, *thead* and *ul* are allowed. + +allowed-attributes + Additional HTML attributes (independent from elements) to allow in the + generated output, comma-separated. By default, only *align* and *href* are + allowed. + +To allow images in comments, you just need to add ``allowed-elements = img`` and +``allowed-attributes = src``. + Appendum -------- diff --git a/docs/isso.example.cfg b/docs/isso.example.cfg index b17199d..a7bedf0 100644 --- a/docs/isso.example.cfg +++ b/docs/isso.example.cfg @@ -110,3 +110,22 @@ direct-reply = 3 # comment. After the editing timeframe is gone, commenters can reply to their # own comments anyways. Do not forget to configure the client. reply-to-self = false + + +[markup] +# Customize markup and sanitized HTML. Currently, only Markdown (via Misaka) is +# supported, but new languages are relatively easy to add. + +# Misaka-specific Markdown extensions, all flags starting with EXT_ can be used +# there, separated by comma. +options = strikethrough, superscript, autolink + +# Additional HTML tags to allow in the generated output, comma-separated. By +# default, only a, blockquote, br, code, del, em, h1, h2, h3, h4, h5, h6, hr, +# ins, li, ol, p, pre, strong, table, tbody, td, th, thead and ul are allowed. +allowed-elements = + +# Additional HTML attributes (independent from elements) to allow in the +# generated output, comma-separated. By default, only align and href are +# allowed. +allowed-attributes =