updated static file url prefix

This commit is contained in:
Stavros Polymenis 2016-10-30 11:44:51 +00:00
parent 777076aa6f
commit e71671b69a
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ open Tyxml.Html
let to_string tyxml = Format.asprintf "%a" (Tyxml.Html.pp ()) tyxml
let head ?(style="/share/style.css") t =
let head ?(style="/static/style.css") t =
head (title (pcdata t)) [
link ~rel:[`Stylesheet] ~href:style ();
meta ~a:[a_charset "utf-8"] ();

View File

@ -70,7 +70,7 @@ let () =
let form_of_ymd = Html.form ~header_tpl blog_url lgrn in
let list_of_ymds = Html.of_file_meta_pairs ~header_tpl ~listing_tpl blog_url lgrn in
App.empty
|> middleware @@ Middleware.static ~local_path:"./share" ~uri_prefix:"/share"
|> middleware @@ Middleware.static ~local_path:"./share/static" ~uri_prefix:"/static"
|> post "/post" (fun req -> ymd_of_req req >>= fun ymd -> L.to_file ymd >>= fun () -> html_response (page_of_ymd ymd))
|> get "/edit/:ttl" (fun r -> ret_param "ttl" r >>= ymdpath >|= ymd >|= form_of_ymd >>= html_response)
|> get "/new" (fun _ -> return Ymd.blank_ymd >|= form_of_ymd >>= html_response)