mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Update doc headers to MkDocs and mention ejabberd version used
This commit is contained in:
parent
a550a1c55c
commit
68c0c4d94f
@ -492,9 +492,9 @@ generate_md_output(File, RegExp, Languages, Cmds) ->
|
||||
end, Cmds2),
|
||||
Cmds4 = [maybe_add_policy_arguments(Cmd) || Cmd <- Cmds3],
|
||||
Langs = binary:split(Languages, <<",">>, [global]),
|
||||
Header = <<"---\ntitle: Administration API reference\ntoc: true\nmenu: API Reference\norder: 1\n"
|
||||
"// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands'\n---\n\n"
|
||||
"This section describes API of ejabberd.\n">>,
|
||||
Version = ejabberd_config:version(),
|
||||
Header = <<"# Administration API reference\n\n"
|
||||
"This section describes API of ejabberd ", Version/binary, ".\n\n">>,
|
||||
Out = lists:map(fun(C) -> gen_doc(C, false, Langs) end, Cmds4),
|
||||
{ok, Fh} = file:open(File, [write]),
|
||||
io:format(Fh, "~ts~ts", [Header, Out]),
|
||||
@ -502,9 +502,9 @@ generate_md_output(File, RegExp, Languages, Cmds) ->
|
||||
ok.
|
||||
|
||||
generate_tags_md(File) ->
|
||||
Header = <<"---\ntitle: API Tags\ntoc: true\nmenu: API Tags\norder: 2\n"
|
||||
"// Autogenerated with 'ejabberdctl gen_markdown_doc_for_tags'\n---\n\n"
|
||||
"This section enumerates the tags and their associated API.\n">>,
|
||||
Version = ejabberd_config:version(),
|
||||
Header = <<"# API Tags\n\n"
|
||||
"This section enumerates the API tags of ejabberd ", Version/binary, ".\n\n">>,
|
||||
Tags = make_tags(false),
|
||||
{ok, Fh} = file:open(File, [write]),
|
||||
io:format(Fh, "~ts~ts", [Header, Tags]),
|
||||
|
@ -72,10 +72,11 @@ man(Lang) ->
|
||||
catch _:undef -> []
|
||||
end
|
||||
end, ejabberd_config:callback_modules(all)),
|
||||
Version = ejabberd_config:version(),
|
||||
Options =
|
||||
["TOP LEVEL OPTIONS",
|
||||
"-----------------",
|
||||
tr(Lang, ?T("This section describes top level options of ejabberd.")),
|
||||
tr(Lang, <<"This section describes top level options of ejabberd ", Version/binary, ".">>),
|
||||
io_lib:nl()] ++
|
||||
lists:flatmap(
|
||||
fun(Opt) ->
|
||||
@ -95,7 +96,7 @@ man(Lang) ->
|
||||
"MODULES",
|
||||
"-------",
|
||||
"[[modules]]",
|
||||
tr(Lang, ?T("This section describes options of all ejabberd modules.")),
|
||||
tr(Lang, <<"This section describes modules options of ejabberd ", Version/binary, ".">>),
|
||||
io_lib:nl()] ++
|
||||
lists:flatmap(
|
||||
fun({M, Descr, DocOpts, Backends, Example}) ->
|
||||
@ -114,7 +115,7 @@ man(Lang) ->
|
||||
"LISTENERS",
|
||||
"-------",
|
||||
"[[listeners]]",
|
||||
tr(Lang, ?T("This section describes options of all ejabberd listeners.")),
|
||||
tr(Lang, <<"This section describes listeners options of ejabberd ", Version/binary, ".">>),
|
||||
io_lib:nl(),
|
||||
"TODO"],
|
||||
AsciiData =
|
||||
|
Loading…
Reference in New Issue
Block a user