Strip .liquid from name before include lookup (#47)

This commit is contained in:
2026-07-19 15:14:41 -04:00
parent 2eb0153e46
commit 4a7481a98a
+3 -1
View File
@@ -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