{"id":15649777,"url":"https://github.com/bnomei/kirby3-schema","last_synced_at":"2025-04-14T07:08:35.977Z","repository":{"id":40664863,"uuid":"507307612","full_name":"bnomei/kirby3-schema","owner":"bnomei","description":"JSON Schema file for Kirby CMS blueprints","archived":false,"fork":false,"pushed_at":"2025-03-18T15:24:28.000Z","size":356,"stargazers_count":42,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-14T07:08:27.931Z","etag":null,"topics":["autocompletion","blueprint","json-schema","kirby","kirby-cms","phpstorm","validation","vscode","yaml"],"latest_commit_sha":null,"homepage":"https://forum.getkirby.com/t/blueprint-yaml-file-autocompletion-and-validation-in-your-favourite-code-editor/25905","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bnomei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-25T12:39:25.000Z","updated_at":"2025-03-18T15:24:17.000Z","dependencies_parsed_at":"2025-03-25T07:45:09.527Z","dependency_job_id":null,"html_url":"https://github.com/bnomei/kirby3-schema","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnomei%2Fkirby3-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnomei%2Fkirby3-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnomei%2Fkirby3-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnomei%2Fkirby3-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bnomei","download_url":"https://codeload.github.com/bnomei/kirby3-schema/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837281,"owners_count":21169374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocompletion","blueprint","json-schema","kirby","kirby-cms","phpstorm","validation","vscode","yaml"],"created_at":"2024-10-03T12:31:59.655Z","updated_at":"2025-04-14T07:08:35.954Z","avatar_url":"https://github.com/bnomei.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/bnomei"],"categories":[],"sub_categories":[],"readme":"# Kirby JSON Schema\n\n[![Kirby 3](https://flat.badgen.net/badge/Kirby/3?color=ECC748)](https://getkirby.com)\n[![Kirby 4](https://flat.badgen.net/badge/Kirby/4?color=ECC748)](https://getkirby.com)\n[![Kirby 5](https://flat.badgen.net/badge/Kirby/5?color=ECC748)](https://getkirby.com)\n![Release](https://flat.badgen.net/github/release/bnomei/kirby3-schema?color=ae81ff\u0026icon=github\u0026label)\n![Checks](https://flat.badgen.net/github/checks/bnomei/kirby3-schema)\n[![Discord](https://flat.badgen.net/badge/discord/bnomei?color=7289da\u0026icon=discord\u0026label)](https://discordapp.com/users/bnomei)\n[![Buymecoffee](https://flat.badgen.net/badge/icon/donate?icon=buymeacoffee\u0026color=FF813F\u0026label)](https://www.buymeacoffee.com/bnomei)\n\nJSON Schema file for Kirby blueprints\n\n## Install\n\n### Schemastore (not yet)\n\nIdeally, this repo's schema would be available from the [Schemastore](https://www.schemastore.org/json/), and there would be almost zero configuration in most IDEs. But that is something the Kirby CMS team should eventually do, not me.\n\n### Download the Schema\n\nYou can clone the entire repo or download the file `kirbyX-blueprints.schema.json`, where `X` matches your intended Kirby version. Put that file inside your project or in a global space of your dev setup. Then configure your IDE to use that file to get Schema information for Kirby's blueprints.\n\n## Configure your IDE\n\n### VSCode\n\nYou will need the [Red Hat VS Code YAML Extension](https://github.com/redhat-developer/vscode-yaml), and then you can use the `yaml.schemas` setting to add your schema like this:\n\n```yaml\n  \"yaml.schemas\": {\n    \"/path/to/your/schema/kirby4-blueprints.schema.json\": \"site/blueprints/**/*.yml\"\n  }\n```\n\nThis will automatically use the schema for all blueprint files.\n\nThe extension prepends `/` on the path so its `/~/YOUR_FOLDER/kirby3-schema/kirby4-blueprints.schema.json`.\n\n\u003e [!NOTE]\n\u003e thanks @tobimori and @iskrisis\n\n### PHPStorm\n\nClone this repo to your local machine. Open the IDE settings and search for `JSON Schema`. Then select `Languages \u0026 Frameworks` » `Schemas and DTDs` » `JSON Schema Mappings`. Click the `+` button at the top to add a new JSON validate configuration. Then, fill in the corresponding name, file or URL, and version.\n\nFor testing, I mapped it to my `site/blueprints` folder.\n\n### Sublime Text\n\nYou can use the schema in Sublime Text by cloning this repo to your local machine and setting a custom JSON schema location using [this Sublime Text extension](https://github.com/sublimelsp/LSP-json?tab=readme-ov-file#custom-schemas]) and wildcards in `fileMatch` [schema settings](https://github.com/sublimelsp/LSP-yaml/blob/7b928a7b84f25381b01fa98c04ca7b1418b3a465/LSP-yaml.sublime-settings#L37) ([more](https://github.com/sublimelsp/LSP-json?tab=readme-ov-file#custom-schemas)).\n\n## Blueprint detection\n\nSince Kirby reuses some types like `file`, `info`, `pages` in fields and sections the schema can not always determine which blueprint you are working on with absolute certainty. For now, I introduced a `blueprint` property to solve this. Use it in your `file`, `page`, `user` and `site` blueprints.  \n\n```diff\n+ blueprint: site\n\ntitle: My Site Blueprint\n\nfields:\n  text:\n    type: text\n```\n\n```diff\n+ blueprint: page\n\ntitle: My Page Blueprint\n\nfields:\n  text:\n    type: text\n```\n\n## Disclaimer\n\nThis schema is provided \"as is\" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please [create a new issue](https://github.com/bnomei/kirby3-schema/issues/new).\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\nIt is discouraged to use this schema in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnomei%2Fkirby3-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbnomei%2Fkirby3-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnomei%2Fkirby3-schema/lists"}