-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve using Blueprints #1137
Comments
Also, the way you get extremely-nested YAML with blueprints I think is problematic. Lots of repeated |
You only nest fields when you are grouping fields together. And there's no other way to do it than to create nested blueprints -- basically in the same way as you would nest HTML. In fact the mapping between YAML and HTML is 1:1. |
Okay. It's just that this pattern was visually a little eye-blurring:
Maybe it's because nesting is easier to visually follow in HTML than YAML. |
@mahagr In the same vein of simplification, could programmatic generation and definition of blueprints be facilitated? That is, rather than define both a plugin.yaml and each associated option in blueprints.yaml, generate the options in the latter from the former. This would alleviate many issues with definitions in blueprints.yaml and could more easily provide error-checking, as well as greatly reduce the time spent writing and testing blueprints. |
Just a thought, not knowing if it helps/goes into the right direction: Maybe adding a CLI command to devtools plugin can generate |
@OleVik Some blueprints are being generated very, very early during the page load, which means that plugins etc aren't yet loaded. With page blueprints, it would work and in fact, you can modify blueprints from the code, though it is not really efficient. On the other hand, if you just mean generating blueprints from admin, it is possible, but not an easy task to do. |
@christian this very idea is being discussed here:
getgrav/grav-plugin-devtools#15
I agree this would be a nice addition.
|
While discussing this with @mahagr and @w00fz we decided we need to make the business of actually using custom blueprints with custom data files a simpler process.
The text was updated successfully, but these errors were encountered: