Commit 2c995219 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[server] provide category in index title entries

parent 98d6ca75
......@@ -296,6 +296,7 @@ let register_sig (type a b) (s : (a,b) signature) (process : rq -> a -> b) =
in
let skind = Main.string_of_kind s.kind in
let title = Printf.sprintf "`%s` %s" skind s.name in
let index = [ Printf.sprintf "%s (`%s`)" s.name skind ] in
let header = [ plain "Input", Center; plain "Output", Center] in
let content =
[[ Syntax.text @@ sy_input s.input ;
......@@ -308,7 +309,7 @@ let register_sig (type a b) (s : (a,b) signature) (process : rq -> a -> b) =
doc_output s.output
in
let _ =
Doc.publish ~page:s.page ~name:s.name ~title ~index:[s.name] description []
Doc.publish ~page:s.page ~name:s.name ~title ~index description []
in
Main.register s.kind s.name processor ;
s.defined <- true
......
......@@ -65,12 +65,13 @@ let publish ~page ~name ~descr ~synopsis ?(details = []) () =
check_page page name ;
let id = Printf.sprintf "data-%s" name in
let title = Printf.sprintf "`DATA` %s" name in
let dref = Doc.href page id in
let index = [ Printf.sprintf "%s (`DATA`)" name ] in
let dref = Doc.href page id in
let dlink = Markdown.href ~text:(Markdown.emph name) dref in
let syntax = Markdown.(glue [
plain "<" ; dlink ; plain ">" ; plain ":=" ; synopsis.text ]) in
let content = Markdown.(Block ( text descr @ text syntax ) :: details) in
let _href = Doc.publish ~page ~name:id ~title ~index:[name] content [] in
let _href = Doc.publish ~page ~name:id ~title ~index content [] in
atom dlink
let unit = atom @@ Markdown.plain "-"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment