Like suggested by @kirbyzone on kirbys idea tracker on nolt a JSON Schema for Kirby would bring autocompletion and validation of the flexible blueprints to your code editor like SublimeText, PHPStorm or VSCode.
In the best case such a schema is published on the official JSON Schema store and thus becomes available in most editors automatically. But with Kirbys blueprints thats quiet a complex task. It took me more than 3000 lines of json to cover the
four root blueprint types (file, page, user, site),
all layout wrappers you can use in page blueprints (tabs, columns, sections, fields),
all sections (fields, files, info, pages, stats) and
I created a preview version and would love to get your feedback and hope that the core team contributes as well β or even better β takes over this project one day.
This also ties in nicely with the highly requested (261 votes) blueprint editor since β well β your code editor will be able do most of that now.
Follow the easy installation instructions from the repos readme to
clone/download repo then
tell your code editor where to find the schema file and to what folder to apply it to
i tried to add the schema in phpstorm follwed the readme steps. Now i get the behavior that blueprints are marked and show me like before messages like **Schema validation: Property βtabsβ is not allowed ** do you now this? Did i configure something wrong or is there a special intendation of the lines?
hi @rapha
depending on which blueprint you are editing the schema does not know about the context. see readme about adding the custom flag. like this for a pages blueprint.
blueprint: page
#rest of your blueprint
also if you have something in the blueprint the schema does not understand the issue might bubble up to the first element (and report that).
try adding things to the blueprint step by step.
it might well be that kirby allows something that the schema cant handle. feel free to create an issue on github if you manage to isolate the issue. thanks