open Tyxml;

let this_title = "Your Cool Web Page";

let image_box = 
;

let links_box =

-  "My Musings" 
    
-  "About Me" 
    
-  "Blog" 
    
-  "Hackathons" 
  
;

let common_footer =

      "This site was made with"
       "OCaml"  (http://ocaml.org)
      "and"
       "emacs"  (https://www.gnu.org/software/emacs/)

;

let home_content = 
 
 "Hello Coder" 
 
;

let main_payload = 
 home_content 
;

let common_nav = Html.nav([links_box]);

let content_box =
  
 common_nav main_payload common_footer 
;

let main_script = ;

let home_page_doc =
  <Home_page title=this_title>
    image_box content_box main_script
  </Home_page>;

// The set of pages in your website.
let pages = [("index.html", home_page_doc)];

// Small code to emit all the pages.
let emit_page = ((name, page)) => {
  Printf.printf("Generating: %s\n", name);
  let file_handle = open_out(name);
  let fmt = Format.formatter_of_out_channel(file_handle);
  Format.fprintf(fmt, "%a@.", Html.pp(~indent=true, ()), page);
  close_out(file_handle);
};

let () = List.iter(emit_page, pages);
