mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-28 22:52:27 +02: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),
|
end, Cmds2),
|
||||||
Cmds4 = [maybe_add_policy_arguments(Cmd) || Cmd <- Cmds3],
|
Cmds4 = [maybe_add_policy_arguments(Cmd) || Cmd <- Cmds3],
|
||||||
Langs = binary:split(Languages, <<",">>, [global]),
|
Langs = binary:split(Languages, <<",">>, [global]),
|
||||||
Header = <<"---\ntitle: Administration API reference\ntoc: true\nmenu: API Reference\norder: 1\n"
|
Version = ejabberd_config:version(),
|
||||||
"// Autogenerated with 'ejabberdctl gen_markdown_doc_for_commands'\n---\n\n"
|
Header = <<"# Administration API reference\n\n"
|
||||||
"This section describes API of ejabberd.\n">>,
|
"This section describes API of ejabberd ", Version/binary, ".\n\n">>,
|
||||||
Out = lists:map(fun(C) -> gen_doc(C, false, Langs) end, Cmds4),
|
Out = lists:map(fun(C) -> gen_doc(C, false, Langs) end, Cmds4),
|
||||||
{ok, Fh} = file:open(File, [write]),
|
{ok, Fh} = file:open(File, [write]),
|
||||||
io:format(Fh, "~ts~ts", [Header, Out]),
|
io:format(Fh, "~ts~ts", [Header, Out]),
|
||||||
|
@ -502,9 +502,9 @@ generate_md_output(File, RegExp, Languages, Cmds) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
generate_tags_md(File) ->
|
generate_tags_md(File) ->
|
||||||
Header = <<"---\ntitle: API Tags\ntoc: true\nmenu: API Tags\norder: 2\n"
|
Version = ejabberd_config:version(),
|
||||||
"// Autogenerated with 'ejabberdctl gen_markdown_doc_for_tags'\n---\n\n"
|
Header = <<"# API Tags\n\n"
|
||||||
"This section enumerates the tags and their associated API.\n">>,
|
"This section enumerates the API tags of ejabberd ", Version/binary, ".\n\n">>,
|
||||||
Tags = make_tags(false),
|
Tags = make_tags(false),
|
||||||
{ok, Fh} = file:open(File, [write]),
|
{ok, Fh} = file:open(File, [write]),
|
||||||
io:format(Fh, "~ts~ts", [Header, Tags]),
|
io:format(Fh, "~ts~ts", [Header, Tags]),
|
||||||
|
|
|
@ -72,10 +72,11 @@ man(Lang) ->
|
||||||
catch _:undef -> []
|
catch _:undef -> []
|
||||||
end
|
end
|
||||||
end, ejabberd_config:callback_modules(all)),
|
end, ejabberd_config:callback_modules(all)),
|
||||||
|
Version = ejabberd_config:version(),
|
||||||
Options =
|
Options =
|
||||||
["TOP LEVEL 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()] ++
|
io_lib:nl()] ++
|
||||||
lists:flatmap(
|
lists:flatmap(
|
||||||
fun(Opt) ->
|
fun(Opt) ->
|
||||||
|
@ -95,7 +96,7 @@ man(Lang) ->
|
||||||
"MODULES",
|
"MODULES",
|
||||||
"-------",
|
"-------",
|
||||||
"[[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()] ++
|
io_lib:nl()] ++
|
||||||
lists:flatmap(
|
lists:flatmap(
|
||||||
fun({M, Descr, DocOpts, Backends, Example}) ->
|
fun({M, Descr, DocOpts, Backends, Example}) ->
|
||||||
|
@ -114,7 +115,7 @@ man(Lang) ->
|
||||||
"LISTENERS",
|
"LISTENERS",
|
||||||
"-------",
|
"-------",
|
||||||
"[[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(),
|
io_lib:nl(),
|
||||||
"TODO"],
|
"TODO"],
|
||||||
AsciiData =
|
AsciiData =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user