Improve formatting and add sections links

This commit is contained in:
Badlop 2021-08-23 13:40:19 +02:00
parent f5038b86f8
commit 30ae66e99e
6 changed files with 31 additions and 26 deletions

View File

@ -313,10 +313,12 @@ doc() ->
{anonymous_protocol, {anonymous_protocol,
#{value => "login_anon | sasl_anon | both", #{value => "login_anon | sasl_anon | both",
desc => desc =>
?T("'login_anon' means that the anonymous login method will be used. " [?T("Define what anonymous protocol will be used: "), "",
"'sasl_anon' means that the SASL Anonymous method will be used. " ?T("* 'login_anon' means that the anonymous login method will be used. "), "",
"'both' means that SASL Anonymous and login anonymous are both " ?T("* 'sasl_anon' means that the SASL Anonymous method will be used. "), "",
"enabled. The default value is 'sasl_anon'.")}}, ?T("* 'both' means that SASL Anonymous and login anonymous are both "
"enabled."), "",
?T("The default value is 'sasl_anon'."), ""]}},
{api_permissions, {api_permissions,
#{value => "[Permission, ...]", #{value => "[Permission, ...]",
desc => desc =>
@ -359,26 +361,28 @@ doc() ->
desc => desc =>
?T("This is used by the contributed module " ?T("This is used by the contributed module "
"'ejabberd_auth_http' that can be installed from the " "'ejabberd_auth_http' that can be installed from the "
"'ejabberd-contrib' Git repository. Please refer to that " "https://github.com/processone/ejabberd-contrib[ejabberd-contrib] "
"Git repository. Please refer to that "
"module's README file for details.")}}, "module's README file for details.")}},
{auth_password_format, {auth_password_format,
#{value => "plain | scram", #{value => "plain | scram",
note => "improved in 20.01", note => "improved in 20.01",
desc => desc =>
?T("The option defines in what format the users passwords " [?T("The option defines in what format the users passwords "
"are stored. 'plain': The password is stored as plain text " "are stored:"), "",
?T("* 'plain': The password is stored as plain text "
"in the database. This is risky because the passwords " "in the database. This is risky because the passwords "
"can be read if your database gets compromised. " "can be read if your database gets compromised. "
"This is the default value. This format allows clients to " "This is the default value. This format allows clients to "
"authenticate using: the old Jabber Non-SASL (XEP-0078), " "authenticate using: the old Jabber Non-SASL (XEP-0078), "
"SASL PLAIN, SASL DIGEST-MD5, and SASL SCRAM-SHA-1. " "SASL PLAIN, SASL DIGEST-MD5, and SASL SCRAM-SHA-1. "), "",
"'scram': The password is not stored, only some information " ?T("* 'scram': The password is not stored, only some information "
"that allows to verify the hash provided by the client. " "that allows to verify the hash provided by the client. "
"It is impossible to obtain the original plain password " "It is impossible to obtain the original plain password "
"from the stored information; for this reason, when this " "from the stored information; for this reason, when this "
"value is configured it cannot be changed to plain anymore. " "value is configured it cannot be changed to plain anymore. "
"This format allows clients to authenticate using: " "This format allows clients to authenticate using: "
"SASL PLAIN and SASL SCRAM-SHA-1.")}}, "SASL PLAIN and SASL SCRAM-SHA-1.")]}},
{auth_scram_hash, {auth_scram_hash,
#{value => "sha | sha256 | sha512", #{value => "sha | sha256 | sha512",
desc => desc =>
@ -449,13 +453,13 @@ doc() ->
{captcha_cmd, {captcha_cmd,
#{value => ?T("Path"), #{value => ?T("Path"),
desc => desc =>
?T("Full path to a script that generates CAPTCHA images. " ?T("Full path to a script that generates http://../basic/#captcha[CAPTCHA] images. "
"There is no default value: when this option is not " "There is no default value: when this option is not "
"set, CAPTCHA functionality is completely disabled.")}}, "set, CAPTCHA functionality is completely disabled.")}},
{captcha_limit, {captcha_limit,
#{value => "pos_integer() | infinity", #{value => "pos_integer() | infinity",
desc => desc =>
?T("Maximum number of CAPTCHA generated images per minute for " ?T("Maximum number of http://../basic/#captcha[CAPTCHA] generated images per minute for "
"any given JID. The option is intended to protect the server " "any given JID. The option is intended to protect the server "
"from CAPTCHA DoS. The default value is 'infinity'.")}}, "from CAPTCHA DoS. The default value is 'infinity'.")}},
{captcha_host, {captcha_host,
@ -464,7 +468,7 @@ doc() ->
{captcha_url, {captcha_url,
#{value => ?T("URL"), #{value => ?T("URL"),
desc => desc =>
?T("An URL where CAPTCHA requests should be sent. NOTE: you need " ?T("An URL where http://../basic/#captcha[CAPTCHA] requests should be sent. NOTE: you need "
"to configure 'request_handlers' for 'ejabberd_http' listener " "to configure 'request_handlers' for 'ejabberd_http' listener "
"as well. There is no default value.")}}, "as well. There is no default value.")}},
{certfiles, {certfiles,

View File

@ -364,6 +364,6 @@ mod_doc() ->
#{desc => #{desc =>
?T("This module can be used to update existing SQL database " ?T("This module can be used to update existing SQL database "
"from the default to the new schema. Check the section " "from the default to the new schema. Check the section "
"http://../database-ldap/#default-and-new-schemas[Default and New Schemas] for details. " "http://../database/#default-and-new-schemas[Default and New Schemas] for details. "
"Please note that only PostgreSQL is supported. " "Please note that only PostgreSQL is supported. "
"When the module is loaded use 'update_sql' ejabberdctl command.")}. "When the module is loaded use 'update_sql' ejabberdctl command.")}.

View File

@ -527,8 +527,8 @@ mod_doc() ->
[?T("This module provides a ReST API to call ejabberd commands " [?T("This module provides a ReST API to call ejabberd commands "
"using JSON data."), "", "using JSON data."), "",
?T("To use this module, in addition to adding it to the 'modules' " ?T("To use this module, in addition to adding it to the 'modules' "
"section, you must also add it to 'request_handlers' of some " "section, you must also enable it in 'listen' -> 'ejabberd_http' -> "
"listener."), "", "http://../listen-options/#request-handlers[request_handlers]."), "",
?T("To use a specific API version N, when defining the URL path " ?T("To use a specific API version N, when defining the URL path "
"in the request_handlers, add a 'vN'. " "in the request_handlers, add a 'vN'. "
"For example: '/api/v2: mod_http_api'"), "", "For example: '/api/v2: mod_http_api'"), "",

View File

@ -232,8 +232,9 @@ mod_doc() ->
"[XEP-0363: HTTP File Upload]. If the request is accepted, " "[XEP-0363: HTTP File Upload]. If the request is accepted, "
"the client receives a URL for uploading the file and " "the client receives a URL for uploading the file and "
"another URL from which that file can later be downloaded."), "", "another URL from which that file can later be downloaded."), "",
?T("In order to use this module, it must be configured as " ?T("In order to use this module, it must be enabled "
"a 'request_handler' for 'ejabberd_http' listener.")], "in 'listen' -> 'ejabberd_http' -> "
"http://../listen-options/#request-handlers[request_handlers].")],
opts => opts =>
[{host, [{host,
#{desc => ?T("Deprecated. Use 'hosts' instead.")}}, #{desc => ?T("Deprecated. Use 'hosts' instead.")}},

View File

@ -278,8 +278,9 @@ listen_options() ->
%%%=================================================================== %%%===================================================================
mod_doc() -> mod_doc() ->
#{desc => #{desc =>
?T("This module adds support for the MQTT protocol " ?T("This module adds "
"version '3.1.1' and '5.0'. Remember to configure " "https://docs.ejabberd.im/admin/guide/mqtt/[support for the MQTT] "
"protocol version '3.1.1' and '5.0'. Remember to configure "
"'mod_mqtt' in 'modules' and 'listen' sections."), "'mod_mqtt' in 'modules' and 'listen' sections."),
opts => opts =>
[{access_subscribe, [{access_subscribe,

View File

@ -638,9 +638,9 @@ mod_doc() ->
?T("* Register a new account on the server."), "", ?T("* Register a new account on the server."), "",
?T("* Change the password from an existing account on the server."), "", ?T("* Change the password from an existing account on the server."), "",
?T("* Delete an existing account on the server."), "", ?T("* Delete an existing account on the server."), "",
?T("This module reads also another option defined globally for the " ?T("This module reads also the top-level _`registration_timeout`_ "
"server: 'registration_timeout'. Please check that option " "option defined globally for the server, "
"documentation in the section with top-level options.")], "so please check that option documentation too.")],
opts => opts =>
[{access, [{access,
#{value => ?T("AccessName"), #{value => ?T("AccessName"),
@ -664,9 +664,8 @@ mod_doc() ->
{captcha_protected, {captcha_protected,
#{value => "true | false", #{value => "true | false",
desc => desc =>
?T("Protect registrations with CAPTCHA (see section " ?T("Protect registrations with http://../basic/#captcha[CAPTCHA]. "
"https://docs.ejabberd.im/admin/configuration/basic/#captcha[CAPTCHA] " "The default is 'false'.")}},
"of the Configuration Guide). The default is 'false'.")}},
{ip_access, {ip_access,
#{value => ?T("AccessName"), #{value => ?T("AccessName"),
desc => desc =>