Skip to content

Commit 5d57800

Browse files
committed
Update README with instructions for adding or editing libraries.
1 parent 251f363 commit 5d57800

File tree

1 file changed

+78
-3
lines changed

1 file changed

+78
-3
lines changed

README.md

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,81 @@
44

55
[![Build Status](https://travis-ci.org/jsonwebtoken/jsonwebtoken.github.io.png?branch=master)](https://travis-ci.org/jsonwebtoken/jsonwebtoken.github.io)
66

7+
### How to add a library
8+
To add a library, simply edit the `data.json` file located at `views/website/libraries`.
9+
10+
If you add a new language, you will need to provide a proper icon for it and place it in the `img` folder.
11+
12+
Here's a commented example of a language + library definition. All fields must have valid values unless noted:
13+
14+
```javascript
15+
// Language name (unique)
16+
".NET": {
17+
18+
// Unique identifier that will be used as a CSS class
19+
// for this language (only valid CSS class names).
20+
"uniqueClass": "net",
21+
22+
// The language icon, SVG format preferred, should be placed
23+
// in /img directory.
24+
"image": "/img/1.svg",
25+
26+
// The color of header that displays the name of the language
27+
// and the icon. This is a valid CSS color definition.
28+
"bgColor": "rgb(42, 168, 229)",
29+
30+
// An array of libraries for this language.
31+
"libs": [
32+
{
33+
// In case the library suffered from a vulnerability, the
34+
// minimum version in which the vuln was fixed must be
35+
// listed here. Optional (can be null).
36+
"minimumVersion": "1.0.1", // or null
37+
38+
// Supported features, true for supported,
39+
// false for not supported.
40+
"support": {
41+
"sign": true,
42+
"verify": true,
43+
"iss": true,
44+
"sub": true,
45+
"aud": true,
46+
"exp": true,
47+
"nbf": true,
48+
"iat": true,
49+
"jti": true,
50+
"hs256": true,
51+
"hs384": true,
52+
"hs512": true,
53+
"rs256": true,
54+
"rs384": true,
55+
"rs512": true,
56+
"es256": true,
57+
"es384": true,
58+
"es512": true
59+
},
60+
61+
// Author URL, can be GitHub profile, personal page
62+
// company page, etc. Can be null.
63+
"authorUrl": "https://www.microsoft.com", // or null
64+
65+
// Author name.
66+
"authorName": "Microsoft",
67+
68+
// For the star count, this is the GitHub repository path,
69+
// (usually user/repo). Can be null (no star count shown).
70+
"gitHubRepoPath": "AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet", // or null
71+
72+
// URL for source code.
73+
"repoUrl": "https://github.com/MSOpenTech/azure-activedirectory-identitymodel-extensions-for-dotnet",
74+
75+
// Install command, can be HTML or plain text.
76+
"installCommandHtml": "Install-Package<br><a href=\"https://www.nuget.org/packages/System.IdentityModel.Tokens.Jwt/\">System.IdentityModel.Tokens.Jwt</a>"
77+
}
78+
]
79+
}
80+
```
81+
782
### How to build
883

984
First, install the required dependencies:
@@ -18,7 +93,9 @@ In order to build (and run) the project execute:
1893
grunt
1994
```
2095

21-
You will find the generated files in the `dist` directory. For the website, you can run a server at its root. For example: `http-server dist/website`.
96+
You will find the generated files in the `dist` directory. For the website, you can run a server at its root. For example: `http-server dist/website`. The default `grunt` task runs a server
97+
at [https://127.0.0.1:8000](https://127.0.0.1:8000) and watches
98+
for changes.
2299

23100
To run tests, execute:
24101

@@ -29,5 +106,3 @@ grunt test
29106
Look at the end of the `Gruntfile` for other common tasks.
30107

31108
### Happy hacking!
32-
33-

0 commit comments

Comments
 (0)