You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This schema file is free but if you use it in a commercial project please consider to sponsor me or make a donation.<br>
14
-
> If my work helped you to make some cash it seems fair to me that I might get a little reward as well, right?<br><br>
15
-
> Be kind. Share a little. Thanks.<br><br>
16
-
> ‐ Bruno<br>
17
-
>
18
-
19
-
| M | O | N | E | Y |
20
-
|---|----|---|---|---|
21
-
|[Github sponsor](https://github.com/sponsors/bnomei)|[Patreon](https://patreon.com/bnomei)|[Buy Me a Coffee](https://buymeacoff.ee/bnomei)|[Paypal dontation](https://www.paypal.me/bnomei/15)|[Hire me](mailto:[email protected]?subject=Kirby)|
22
-
23
12
## Install
24
13
25
14
### Schemastore (not yet)
26
15
27
-
Ideally the schema of this repowould be available from the [Schemastore](https://www.schemastore.org/json/) and it would be almost zero configuration in most IDEs. But that is something the Kirby CMS team should do eventually, not me.
16
+
Ideally, 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.
28
17
29
-
### Manual IDE configuration
18
+
### Download the Schema
30
19
31
-
#### VSCode
20
+
You 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.
32
21
33
-
You 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:
22
+
## Configure your IDE
23
+
24
+
### VSCode
25
+
26
+
You 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:
34
27
35
28
```yaml
36
29
"yaml.schemas": {
@@ -42,20 +35,20 @@ This will automatically use the schema for all blueprint files.
42
35
43
36
The extension prepends `/` on the path so its `/~/YOUR_FOLDER/kirby3-schema/kirby4-blueprints.schema.json`.
44
37
38
+
> [!NOTE]
45
39
> thanks @tobimori and @iskrisis
46
40
47
-
#### PHP Storm
48
-
49
-
Clone this repo to your local machine. Open the IDE settings and search for `JSON Schema`. Then select `Languages & 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.
41
+
### PHPStorm
50
42
51
-
For testing I mapped it to my `site/blueprints` folder.
43
+
Clone this repo to your local machine. Open the IDE settings and search for `JSON Schema`. Then select `Languages & 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.
52
44
45
+
For testing, I mapped it to my `site/blueprints` folder.
53
46
54
-
####Sublime Text
47
+
### Sublime Text
55
48
56
49
You 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](https://github.com/sublimelsp/LSP-yaml) 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)].
57
50
58
-
###Blueprint detection
51
+
## Blueprint detection
59
52
60
53
Since 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.
0 commit comments