diff --git a/src/ejabberd_commands_doc.erl b/src/ejabberd_commands_doc.erl index 646eafe90..485e7f68e 100644 --- a/src/ejabberd_commands_doc.erl +++ b/src/ejabberd_commands_doc.erl @@ -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]), diff --git a/src/ejabberd_doc.erl b/src/ejabberd_doc.erl index c5398350f..3ea95f91b 100644 --- a/src/ejabberd_doc.erl +++ b/src/ejabberd_doc.erl @@ -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 =