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"
|
raise <| NotImplementedException "The theme file provider does not support directory listings"
|
||||||
|
|
||||||
member _.GetFileInfo path =
|
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
|
match data.Theme.FindById themeId |> Async.AwaitTask |> Async.RunSynchronously with
|
||||||
| Some theme ->
|
| 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 ->
|
| Some template ->
|
||||||
{ new IFileInfo with
|
{ new IFileInfo with
|
||||||
member _.Exists = true
|
member _.Exists = true
|
||||||
|
|||||||
Reference in New Issue
Block a user