25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Add header to generated markdown file

This commit is contained in:
Paweł Chmielowski 2016-01-26 10:46:38 +01:00
parent bdeb4a7e32
commit 621dff7307

View File

@ -420,9 +420,10 @@ generate_md_output(File, RegExp, Languages) ->
N1 =< N2
end, Cmds2),
Langs = binary:split(Languages, <<",">>, [global]),
Header = <<"---\ntitle: Administration API reference\nbodyclass: nocomment\n---">>,
Out = lists:map(fun(C) -> gen_doc(C, false, Langs) end, Cmds3),
{ok, Fh} = file:open(File, [write]),
io:format(Fh, "~s", [[Out]]),
io:format(Fh, "~s~s", [Header, Out]),
file:close(Fh),
ok.