struct
let make_page ~title ~stylesheets ~toc ~menu content =
let link css =
sprintf "<link rel=\"stylesheet\" href=%S type=\"text/css\">" css in
Meta_result.return (
" <!DOCTYPE html> <html> <head>"
^ String.concat ~sep:"\n" (List.map stylesheets ~f:link)
^ "<meta charset=\"utf-8\">"
^ sprintf "<title>%s</title>" title
^ "</head>"
^ "<body><div class=\"container\">"
^ sprintf "<h1>%s</h1>" title
^ "<div class=\"row\">\n<div class=\"col-md-3\">\n<h2>Contents</h2>"
^ toc
^ "<h2>Menu</h2>"
^ menu
^ "</div><div class=\"col-md-9\">"
^ content
^ "</div></div></div></body><html>")
end