Skip to content

Commit 3700135

Browse files
committed
docs: add JSON schema section to bot configuration
1 parent f2213f5 commit 3700135

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

src/content/docs/bot/configuration.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,42 @@ can configure how you want `@all-contributors` to generate the list.
1010

1111
> You are viewing the 🤖Bot Configuration, which is similar to the [CLI Configuration](/cli/configuration)
1212
13+
## JSON Schema
14+
15+
You can validate your `.all-contributorsrc` configuration file using the JSON schema available on [SchemaStore](https://www.schemastore.org/all-contributors.json).
16+
17+
This helps in catching configuration errors early and provides auto-completion in compatible editors (like VS Code).
18+
19+
Example `.all-contributorsrc` with `$schema` added:
20+
21+
```json
22+
{
23+
"$schema": "https://www.schemastore.org/all-contributors.json",
24+
"projectName": "all-contributors",
25+
"projectOwner": "all-contributors",
26+
"repoType": "github",
27+
"repoHost": "https://github.com",
28+
"files": ["README.md"],
29+
"imageSize": 100,
30+
"commit": false,
31+
"contributorsPerLine": 7,
32+
"contributorsSortAlphabetically": false,
33+
"badgeTemplate": "[![All Contributors](https://img.shields.io/github/all-contributors/<%= projectOwner %>/<%= projectName %>?color=ee8449&style=flat-square)](#contributors)",
34+
"contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
35+
"wrapperTemplate": "\n<table>\n <tbody><%= bodyContent %> </tbody>\n<%= tableFooterContent %></table>\n\n",
36+
"types": {
37+
"custom": {
38+
"symbol": "🔭",
39+
"description": "A custom contribution type.",
40+
"link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),"
41+
}
42+
},
43+
"linkToUsage": true,
44+
"skipCi": true,
45+
"contributors": []
46+
}
47+
```
48+
1349
These are the keys you can specify:
1450

1551
| Option | Description | Example/Default |

0 commit comments

Comments
 (0)