Gemini heading fixes
This commit is contained in:
parent
eef6f3f710
commit
90ec1d244c
@ -33,7 +33,6 @@ let to_dated_links ?(limit) meta_list =
|
||||
let topic_link root topic =
|
||||
"=> index." ^ root ^ ".gmi " ^ String.capitalize_ascii topic ^ "\n"
|
||||
|
||||
|
||||
let text_item path meta =
|
||||
let open Logarion in
|
||||
"=> " ^ path ^ Text.alias meta ^ ".gmi "
|
||||
@ -59,17 +58,16 @@ let listing_index topic_map topic_roots path metas =
|
||||
in
|
||||
item_group topic_roots
|
||||
|
||||
|
||||
let fold_topic_roots topic_roots =
|
||||
let list_item root t = topic_link root t in
|
||||
List.fold_left (fun a x -> a ^ list_item x x) "" (List.rev topic_roots)
|
||||
|
||||
let topic_main_index _title topic_roots metas =
|
||||
"# Main topics\n\n"
|
||||
^ fold_topic_roots topic_roots
|
||||
^ "\n\n# Latest\n\n" ^ to_dated_links ~limit:10 metas
|
||||
let topic_main_index title topic_roots metas =
|
||||
"# " ^ title ^ "\n\n"
|
||||
^ if topic_roots <> [] then ("## Main topics\n\n" ^ fold_topic_roots topic_roots) else ""
|
||||
^ "\n## Latest\n\n" ^ to_dated_links ~limit:10 metas
|
||||
^ "\n=> index.date.gmi More by date\n"
|
||||
|
||||
let topic_sub_index _title topic_map topic_root metas =
|
||||
"# " ^ String.capitalize_ascii topic_root ^ "\n\n"
|
||||
let topic_sub_index title topic_map topic_root metas =
|
||||
"# " ^ title ^ "\n\n"
|
||||
^ listing_index topic_map [topic_root] "" metas
|
||||
|
Loading…
x
Reference in New Issue
Block a user