From 4a7481a98a87c76d210f13ca080b2f96b1d04e1c Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Sun, 19 Jul 2026 15:14:41 -0400 Subject: [PATCH] Strip .liquid from name before include lookup (#47) --- src/MyWebLog/Template.fs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MyWebLog/Template.fs b/src/MyWebLog/Template.fs index 8fc4462..d4d3c43 100644 --- a/src/MyWebLog/Template.fs +++ b/src/MyWebLog/Template.fs @@ -371,9 +371,11 @@ type ThemeFileProvider(themeId: ThemeId, data: IData) = raise <| NotImplementedException "The theme file provider does not support directory listings" member _.GetFileInfo path = + // Remove ".liquid" from the path passed + let templateName = path[.. (path.Length - 8)] match data.Theme.FindById themeId |> Async.AwaitTask |> Async.RunSynchronously with | Some theme -> - match theme.Templates |> List.tryFind (fun t -> t.Name = path) with + match theme.Templates |> List.tryFind (fun t -> t.Name = templateName) with | Some template -> { new IFileInfo with member _.Exists = true