Skip to content

Commit f732ba6

Browse files
authored
Merge pull request #73 from CloudCannon/rphillips-cc-patch-1
Revise usage section in README.md
2 parents 069531f + 87fbb16 commit f732ba6

1 file changed

Lines changed: 1 addition & 38 deletions

File tree

README.md

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -21,44 +21,7 @@ npm i -D @cloudcannon/configuration-types
2121

2222
## Usage
2323

24-
We plan to add the configuration schema to [JSON Schema Store](https://www.schemastore.org/json/), which would automatically enable in-editor validation, autocomplete and tooltips with the YAML or JSON LSP enabled.
25-
26-
Alternatively, you can add a comment to the top of your file to use a specific schema for YAML files:
27-
28-
```yaml
29-
# yaml-language-server: $schema=https://raw.githubusercontent.com/CloudCannon/configuration-types/main/dist/cloudcannon-config.schema.json
30-
31-
collections_config:
32-
posts:
33-
path: content/posts
34-
name: Blog
35-
icon: event
36-
```
37-
38-
Or the top-level `$schema` entry for JSON files:
39-
40-
```json
41-
{
42-
"$schema": "https://raw.githubusercontent.com/CloudCannon/configuration-types/main/dist/cloudcannon-config.schema.json",
43-
44-
"collections_config": {
45-
"posts": {
46-
"path": "content/posts",
47-
"name": "Blog",
48-
"icon": "event"
49-
}
50-
}
51-
}
52-
```
53-
54-
You could also/alternatively validate the file on the command line with something like [ajv-cli](https://github.com/ajv-validator/ajv-cli):
55-
56-
```sh
57-
npm i @cloudcannon/configuration-types ajv-cli
58-
npm run ajv validate -s node_modules/@cloudcannon/configuration-types/schema/cloudcannon-config.schema.json -d cloudcannon.config.yml
59-
```
60-
61-
***
24+
The configuration schemas are available at [JSON Schema Store](https://www.schemastore.org/json/), which automatically enables in-editor validation, autocomplete and tooltips with the YAML or JSON LSP enabled.
6225

6326
## Development
6427

0 commit comments

Comments
 (0)