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
1 changed files with 2 additions and 1 deletions

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.