From 2f3d88a0c5ac6dcc176caa4a940bba39e47c5ec7 Mon Sep 17 00:00:00 2001 From: orbifx Date: Tue, 22 Jun 2021 15:20:45 +0100 Subject: [PATCH] Format improvements for Gemini output --- cli/gemini.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/gemini.ml b/cli/gemini.ml index 52bc2cc..50066de 100644 --- a/cli/gemini.ml +++ b/cli/gemini.ml @@ -11,7 +11,7 @@ let date_index title meta_list = (fun a m -> a ^ "=> " ^ Logarion.Text.alias m ^ ".gmi " ^ Logarion.(Date.(pretty_date (listing m.date)) ^ " " ^ m.title) ^ "\n") - ("# " ^ title ^ "\n\n") meta_list + ("# " ^ title ^ "\n\n## Posts by date\n\n") meta_list let to_dated_links ?(limit) meta_list = let meta_list = match limit with @@ -64,7 +64,7 @@ let fold_topic_roots topic_roots = 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 "" + ^ (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"