1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-12-16 01:10:30 +02:00

Update text on optional JSON data in Contributing Guidelines (#5068)

This commit is contained in:
Eric Cornelissen 2021-03-01 13:16:24 +01:00 committed by GitHub
parent a769301056
commit 693e626649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,17 +187,33 @@ Here is the svg for the Adobe Photoshop icon as an example:
Icon metadata should be added to the `_data/simple-icons.json` file. Each icon in the array has three required values:
* The `title` of the new SVG.
* A `hex` color value that matches the brand's primary color. All uppercase and without the `#` pound symbol.)
* The `source` URL of the logo being used. There are [more details below](#source-guidelines).
* The `title` of the new SVG.
* A `hex` color value that matches the brand's primary color. All uppercase and without the `#` symbol.
* The `source` URL of the logo being used. There are [more details below](#source-guidelines).
Additionally, there are also optional fields that may provided for an icon:
- The `guidelines` may be used to specify the URL of the brand's guidelines/presskit/etc. This is useful if the SVG file was sourced from a different place.
- The `license` may be used to record the license under which the icon is available. This is an object with a `type` and `url`. The `type` should be an [SPDX License ID](https://spdx.org/licenses/) or `"custom"`, the `url` is optional unless the `type` is `"custom"`.
The are also [optional values](#optional-data) that may be provided for each icon, which are listed below.
Here is the object of a fictional brand as an example:
```json
{
"title": "A Fictional Brand",
"hex": "123456",
"source": "https://www.a-fictional-brand.org/logo"
}
```
Make sure the icon is added in alphabetical order. If you're in doubt, you can always run `npm run our-lint` - this will tell you if any of the JSON data is in the wrong order.
#### Optional Data
Additionally, each icon in the `_data/simple-icons.json` file may be given any of the following optional values:
* The `guidelines` may be used to specify the URL of the brand's guidelines/press kit/etc. This is useful if the SVG file was sourced from a different place, still if the SVG file was sourced from the guidelines, the URL should be duplicated here.
* The `license` may be used to specify the license under which the icon is available. This is an object with a `type` and `url`. The `type` should be an [SPDX License ID](https://spdx.org/licenses/) or `"custom"`, the `url` is optional unless the `type` is `"custom"`.
Here is the object of the fictional brand from before, but with all optional values, as an example:
```json
{
"title": "A Fictional Brand",
@ -205,14 +221,12 @@ Here is the object of a fictional brand as an example:
"source": "https://www.a-fictional-brand.org/logo",
"guidelines": "https://www.a-fictional-brand.org/brand-guidelines",
"license": {
"type": "CC0-1.0",
"url": "https://www.a-fictional-brand.org/logo/license"
"type": "CC0-1.0",
"url": "https://www.a-fictional-brand.org/logo/license"
}
}
```
Make sure the icon is added in alphabetical order. If you're in doubt, you can always run `npm run our-lint` - this will tell you if any of the JSON data is in the wrong order.
#### SVG Filename Convention
The filename of the SVG should correspond to the `title` used in the JSON file mentioned above, and it should follow the rules below. If you're in doubt, you can always run `npm run get-filename -- Brand name` to get the correct filename.