Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (** Goes about building the html for the site *)
- let pages = [("index.html", Site.home_page_doc)]
- let () =
- List.iter begin fun (page_name, a_page) ->
- Printf.sprintf "Generating: %s" page_name |> print_endline;
- let file_handle = open_out page_name in
- Html5.P.print (output_string file_handle) a_page;
- close_out file_handle;
- match Sys.command (Printf.sprintf "tidy -im -ashtml %s" page_name) with
- | 0 -> ()
- | c -> failwith (Printf.sprintf "Tidy failed with code: %d" c)
- end
- pages
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement