Strip .liquid from name before include lookup (#47)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user