Advertisement
Guest User

Untitled

a guest
Feb 21st, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. (** Goes about building the html for the site *)
  2.  
  3. let pages = [("index.html", Site.home_page_doc)]
  4.  
  5. let () =
  6. List.iter begin fun (page_name, a_page) ->
  7. Printf.sprintf "Generating: %s" page_name |> print_endline;
  8. let file_handle = open_out page_name in
  9. Html5.P.print (output_string file_handle) a_page;
  10. close_out file_handle;
  11. match Sys.command (Printf.sprintf "tidy -im -ashtml %s" page_name) with
  12. | 0 -> ()
  13. | c -> failwith (Printf.sprintf "Tidy failed with code: %d" c)
  14. end
  15. pages
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement