#2140·grav

Theme inheritance and config files

Author: PerlkonigCreated Aug 9, 2018Updated Aug 21, 2026
Labelsquestion

Let's start with the ask: can Grav be altered to actually process an inherited YAML file instead of just obscuring it?

I'm dealing with an inheritance issue with my Knowledge Base theme.

The fundamental problem is that Grav inheritance is all or nothing. New files simply obscure inherited ones. This makes sense for Twig files, but this is problematic when your theme uses the theme YAML file. When you inherit a theme, the docs instruct you to create a new theme config file with the streams settings, which clobbers any settings in the inherited config file.

So first of all, I'll be submitting a PR against the docs adding some additional instruction to work around this issue.

But ideally, can Grav be altered to actually process the inherited YAML file instead of just obscuring it? That way the person inheriting the theme can still create a new file, drop in the streams stuff, and then just overwrite individual settings, but all the theme defaults will still be set.

I'd go straight to a PR, but I'm not familiar enough with the internals to know where to start. With some direction, I'm certainly willing to try my hand at it.

Thanks!