mirror of
https://github.com/samsonjs/mit-license.git
synced 2026-04-27 15:07:42 +00:00
commit
ffb80765d7
1 changed files with 53 additions and 35 deletions
88
README.md
88
README.md
|
|
@ -20,14 +20,18 @@ You can fork this project, send me a pull request and wait for me to
|
||||||
pull (which I'll do as quickly as possible) or if the user is still
|
pull (which I'll do as quickly as possible) or if the user is still
|
||||||
available you can do it yourself from the command line:
|
available you can do it yourself from the command line:
|
||||||
|
|
||||||
curl -d'{ "copyright": "Remy Sharp" }' http://rem.mit-license.org
|
```bash
|
||||||
|
curl -d'{ "copyright": "Remy Sharp" }' http://rem.mit-license.org
|
||||||
|
```
|
||||||
|
|
||||||
If the `rem` user isn't taken already, then this will create the new
|
If the `rem` user isn't taken already, then this will create the new
|
||||||
user file on the fly and the url will be immediately available.
|
user file on the fly and the url will be immediately available.
|
||||||
|
|
||||||
You can send a full JSON file to the API, not *just* the copyright, so this works too:
|
You can send a full JSON file to the API, not *just* the copyright, so this works too:
|
||||||
|
|
||||||
curl -d'{ "copyright": "Remy Sharp", "url": "http://remysharp.com", "email": "me@mysite.com", "format": "txt" }' http://rem.mit-license.org
|
```bash
|
||||||
|
curl -d'{ "copyright": "Remy Sharp", "url": "http://remysharp.com", "email": "me@mysite.com", "format": "txt" }' http://rem.mit-license.org
|
||||||
|
```
|
||||||
|
|
||||||
If there's any problems in the automated creation, send me a pull
|
If there's any problems in the automated creation, send me a pull
|
||||||
request and it'll go live soon after.
|
request and it'll go live soon after.
|
||||||
|
|
@ -59,9 +63,11 @@ Create a new file and give it the name of the CNAME you want (in my case
|
||||||
it's `rem.json`). This file contains a JSON object containing at least a
|
it's `rem.json`). This file contains a JSON object containing at least a
|
||||||
`copyright` property:
|
`copyright` property:
|
||||||
|
|
||||||
{
|
```json
|
||||||
"copyright": "Remy Sharp, http://remysharp.com"
|
{
|
||||||
}
|
"copyright": "Remy Sharp, http://remysharp.com"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Means I can now link to: http://rem.mit-license.org and it will show my
|
Means I can now link to: http://rem.mit-license.org and it will show my
|
||||||
license name (note that the date will always show the current year).
|
license name (note that the date will always show the current year).
|
||||||
|
|
@ -71,10 +77,12 @@ license name (note that the date will always show the current year).
|
||||||
In addition to the `copyright` property, if you want to make a link from
|
In addition to the `copyright` property, if you want to make a link from
|
||||||
the copyright text, you can include a `url` property:
|
the copyright text, you can include a `url` property:
|
||||||
|
|
||||||
{
|
```json
|
||||||
"copyright": "Remy Sharp, http://remysharp.com",
|
{
|
||||||
"url": "http://remysharp.com"
|
"copyright": "Remy Sharp, http://remysharp.com",
|
||||||
}
|
"url": "http://remysharp.com"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### email
|
### email
|
||||||
|
|
||||||
|
|
@ -82,34 +90,40 @@ You can also include a link to your email which is displayed after the
|
||||||
copyright notice using the `email` property (note the `mailto:` is
|
copyright notice using the `email` property (note the `mailto:` is
|
||||||
automatically added):
|
automatically added):
|
||||||
|
|
||||||
{
|
```json
|
||||||
"copyright": "Remy Sharp, http://remysharp.com",
|
{
|
||||||
"url": "http://remysharp.com",
|
"copyright": "Remy Sharp, http://remysharp.com",
|
||||||
"email": "me@mysite.com"
|
"url": "http://remysharp.com",
|
||||||
}
|
"email": "me@mysite.com"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### format
|
### format
|
||||||
|
|
||||||
And if you want your license to appear as plain text, just add the
|
And if you want your license to appear as plain text, just add the
|
||||||
`format` property (currently only `txt` and `html` are supported):
|
`format` property (currently only `txt` and `html` are supported):
|
||||||
|
|
||||||
{
|
```json
|
||||||
"copyright": "Remy Sharp, http://remysharp.com",
|
{
|
||||||
"url": "http://remysharp.com",
|
"copyright": "Remy Sharp, http://remysharp.com",
|
||||||
"format": "txt"
|
"url": "http://remysharp.com",
|
||||||
}
|
"format": "txt"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### gravatar
|
### gravatar
|
||||||
|
|
||||||
And if you want to show your gravatar, just add the `gravatar`
|
And if you want to show your gravatar, just add the `gravatar`
|
||||||
boolean property:
|
boolean property:
|
||||||
|
|
||||||
{
|
```json
|
||||||
"copyright": "Remy Sharp, http://remysharp.com",
|
{
|
||||||
"url": "http://remysharp.com",
|
"copyright": "Remy Sharp, http://remysharp.com",
|
||||||
"email": "me@mysite.com",
|
"url": "http://remysharp.com",
|
||||||
"gravatar": true
|
"email": "me@mysite.com",
|
||||||
}
|
"gravatar": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Note that the gravatar requires the email property. You also need to check the
|
Note that the gravatar requires the email property. You also need to check the
|
||||||
compatibility of the chosen theme. Currently, only the default theme supports
|
compatibility of the chosen theme. Currently, only the default theme supports
|
||||||
|
|
@ -133,11 +147,13 @@ shows an older version of the LICENSE.html file (compared to the [latest version
|
||||||
|
|
||||||
This can also be targeted in my JSON file:
|
This can also be targeted in my JSON file:
|
||||||
|
|
||||||
{
|
```json
|
||||||
"copyright": "Remy Sharp, http://remysharp.com",
|
{
|
||||||
"url": "http://remysharp.com",
|
"copyright": "Remy Sharp, http://remysharp.com",
|
||||||
"version": "a526rbf7"
|
"url": "http://remysharp.com",
|
||||||
}
|
"version": "a526rbf7"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Note that if no version is supplied, the latest copy of the LICENSE.html
|
Note that if no version is supplied, the latest copy of the LICENSE.html
|
||||||
will be displayed with your information included.
|
will be displayed with your information included.
|
||||||
|
|
@ -151,11 +167,13 @@ is simple and clean, but you can add your own as you like.
|
||||||
To use a theme, add the `theme` property to your `user.json` file, for
|
To use a theme, add the `theme` property to your `user.json` file, for
|
||||||
example:
|
example:
|
||||||
|
|
||||||
{
|
```json
|
||||||
"copyright": "Remy Sharp, http://remysharp.com",
|
{
|
||||||
"url": "http://remysharp.com",
|
"copyright": "Remy Sharp, http://remysharp.com",
|
||||||
"theme": "flesch"
|
"url": "http://remysharp.com",
|
||||||
}
|
"theme": "flesch"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Current available themes:
|
Current available themes:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue