statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.64k stars 236 forks source link

Overriding a partial file fails to cause it to render #889

Open Buildstarted opened 4 years ago

Buildstarted commented 4 years ago

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.

daveaglick commented 4 years ago

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.

Buildstarted commented 4 years ago

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.