Hi everyone.
I had a hard time making blueprints work in themes. Technically my problem is solved, but I don't know if I solved it the good way.
According to the documentation, blueprints in themes (here, for pages) should work out of the box. But, if I place my blueprint to extend the page modification form at my-theme/blueprints/pages/default.yaml, it didn't work. Like, there is no error message at all but the blueprint is ignored.
By digging really deep into the blueprint & themes-loading code, I found that I could force-register the blueprints in Grav by adding this to my template configuration file (my-theme/my-theme.yaml):
# Required for the theme blueprints to work. (Undocumented??)
streams:
schemes:
blueprints:
type: ReadOnlyStream
paths: ['themes://my-theme/blueprints']
And, well, it works! My blueprint is correctly recognized, and everything is ok. Or, is it? Is this way of registering the blueprint a good one? It's documented nowhere as far as I know, and I don't know if I used a strange and unmaintained (or deprecated) way to do so. Either that or the documentation is missing something (or I am).
Thank you for your support, and (as I'm here) for this excellent piece of software called Grav (theses problems excepted, I had a really good time working with it!).