From f94e6b9216c41a7bfd78a73c67b2f805ff75242d Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sat, 25 Jan 2025 19:23:22 +0100 Subject: Update helper modules. --- lib/helpers/file_helpers.ml | 3 +-- lib/helpers/html_helpers.ml | 18 ------------------ 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 lib/helpers/html_helpers.ml diff --git a/lib/helpers/file_helpers.ml b/lib/helpers/file_helpers.ml index 892d807..a1b5372 100644 --- a/lib/helpers/file_helpers.ml +++ b/lib/helpers/file_helpers.ml @@ -3,5 +3,4 @@ let list_files dir = Array.to_list (Sys.readdir dir) |> List.map (fun file -> Printf.sprintf "
  • %s
  • " file) |> String.concat "" - with _ -> - "
  • Error: Unable to read directory
  • " + with _ -> "
  • Error: Unable to read directory
  • " diff --git a/lib/helpers/html_helpers.ml b/lib/helpers/html_helpers.ml deleted file mode 100644 index da5addc..0000000 --- a/lib/helpers/html_helpers.ml +++ /dev/null @@ -1,18 +0,0 @@ -(* Helper function to generate links for repositories *) -let generate_repo_links () = - let git_dir = Filename.concat (Unix.getenv "HOME") "git" in - if Sys.file_exists git_dir && Sys.is_directory git_dir then - Sys.readdir git_dir - |> Array.to_list - |> List.map (fun repo -> Printf.sprintf "
  • %s
  • " repo repo) - |> String.concat "" - else - "
  • Error: '~/git' directory not found.
  • " - -(* Page layout function *) -let page_layout ~content = - "" - ^ Layouts.Header.header () - ^ Layouts.Topnav.topnav () - ^ "
    " ^ content ^ "
    " - ^ "" -- cgit v1.2.3