Statiq.Web
Statiq.Web copied to clipboard
Overriding a partial file fails to cause it to render
Trying to override the partial file _Head.cshtml
in the SolidState theme failed to apply. However if I override the _Layout.cshtml
as well then the correct _Head.cshtml
is rendered.
It seems as if when partials are called it isn't taking into account the input directory first then the theme location but instead it only looks in the theme location.
Interesting - it likely looks in a path relative to the actual layout. So if the layout is in the theme folder, it'll look there for the partial. If it's in the input folder, it'll look there.
The set of locations to check for partials is customizable, so even though the Razor engine doesn't know about the virtual Wyam file system that combines both folders, I could potentially have it look in both places. How important would you say this fix is for Wyam? I'm about to move this whole repository, issues and all, to statiqdev and continue working it there. I'd like to bring this issue along to make sure the problem is fixed in Statiq, but it's unlikely I'll dedicate the time to fixing it in Wyam.
Not a problem. When i saw the statiqdev repo recently I realized wyam was probably not going to be looked at. :)
With regards to how important I think it is. Probably low on the scale of things if I'm the first to mention it after such a long time of people using it.