No description
Find a file
2019-05-31 23:44:35 +12:00
.github PR template 2016-05-14 17:40:06 +01:00
licenses Add extra copyright, links in the copyright owner and year range 2019-05-31 23:44:35 +12:00
themes Improve tests and fix broken files discovered 2019-05-31 20:28:03 +12:00
users Add extra copyright, links in the copyright owner and year range 2019-05-31 23:44:35 +12:00
.eslintrc.json Allow Raw text as well as HTML and add other licenses 2019-05-29 20:08:19 +12:00
.gitattributes Start migration to node 2019-05-29 11:06:41 +12:00
.gitignore Allow Raw text as well as HTML and add other licenses 2019-05-29 20:08:19 +12:00
.htaccess protect .git directory from being served 2013-03-07 12:22:55 +00:00
.travis.yml Add extra copyright, links in the copyright owner and year range 2019-05-31 23:44:35 +12:00
CODE_OF_CONDUCT.md Use HTTPS links 2019-05-31 16:41:10 +12:00
CONTRIBUTING.md Start implementing API 2019-05-31 19:01:51 +12:00
favicon.ico +favicon 2011-10-16 23:41:34 +01:00
index.php Improve tests and fix broken files discovered 2019-05-31 20:28:03 +12:00
LICENSE Use HTTPS links 2019-05-31 16:41:10 +12:00
package.json Add extra copyright, links in the copyright owner and year range 2019-05-31 23:44:35 +12:00
Procfile Automatically prefix and polyfill CSS 2019-05-31 16:39:01 +12:00
README.md Add extra copyright, links in the copyright owner and year range 2019-05-31 23:44:35 +12:00
robots.txt Add extra copyright, links in the copyright owner and year range 2019-05-31 23:44:35 +12:00
server.ts Add extra copyright, links in the copyright owner and year range 2019-05-31 23:44:35 +12:00
test.js Catch invalid copyright info and fix broken files 2019-05-31 23:19:18 +12:00
tsconfig.json Allow Raw text as well as HTML and add other licenses 2019-05-29 20:08:19 +12:00
util.ts Allow Raw text as well as HTML and add other licenses 2019-05-29 20:08:19 +12:00
yarn.lock Add extra copyright, links in the copyright owner and year range 2019-05-31 23:44:35 +12:00

A permalink for your MIT License

I always forget to add an MIT-license.txt file to my projects, so I wanted to link to a single resource that would always be up to date and would always have my details online.

Why keep this to myself, there's two ways to create your own MIT license page:

  1. Make a request to the API (details below)
  2. Fork this project and send a pull request

Now I can always include http://rem.mit-license.org in all my projects which links rem (the cname) against my copyright holder name Remy Sharp - all stored in the users directory.

Requesting your own MIT license page

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 available you can do it yourself from the command line:

curl -d'{ "copyright": "Remy Sharp" }' https://rem.mit-license.org

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.

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" }' https://rem.mit-license.org

If there's any problems in the automated creation, send me a pull request and it'll go live soon after.

Equally if you need to update the user file to include more details that you didn't initially include (extra fields in the next section) you will need to send a pull request on that user.json file via GitHub.

The user.json file

The users directory contains a list of files, each representing a host on mit-license.org. The minimum requirement for the JSON is that is contains a copyright field - everything else is optional. Remember to ensure the user.json file is valid JSON.

Available fields:

  • copyright (required)
  • url
  • email
  • format
  • gravatar
  • theme

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 copyright property:

{
  "copyright": "Remy Sharp, http://remysharp.com"
}

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).

You can also use an array to hold multiple copyright holders:

{
  "copyright": ["Remy Sharp", "Richie Bendall"]
}

Which will be formatted as:

Remy Sharp and Richie Bendall

If you additionally want to include a URL and email with each copyright holder, use objects in the array:

{
    "copyright": [{
        "name": "Remy Sharp, https://remysharp.com",
        "url": "https://remysharp.com",
        "email": "remy@remysharp.com"
    }, {
        "name": "Richie Bendall, https://www.richie-bendall.ml",
        "url": "https://www.richie-bendall.ml",
        "email": "richiebendall@gmail.com"
    }]
}

url

In addition to the copyright property, if you want to make a link from the copyright text, you can include a url property:

{
  "copyright": "Remy Sharp, http://remysharp.com",
  "url": "http://remysharp.com"
}

email

You can also include a link to your email which is displayed after the copyright notice using the email property (note the mailto: is automatically added):

{
  "copyright": "Remy Sharp, http://remysharp.com",
  "url": "http://remysharp.com",
  "email": "me@mysite.com"
}

format

And if you want your license to appear as plain text, just add the format property (currently only txt and html are supported):

{
  "copyright": "Remy Sharp, http://remysharp.com",
  "url": "http://remysharp.com",
  "format": "txt"
}

gravatar

And if you want to show your gravatar, just add the gravatar boolean property:

{
  "copyright": "Remy Sharp, http://remysharp.com",
  "url": "http://remysharp.com",
  "email": "me@mysite.com",
  "gravatar": true
}

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 Gravatar.

Themes

If you've got an eye for design (or like me: not): you can contribute a theme by adding a CSS file to the themes directory. You can use the latest CSS technologies since they are automatically polyfilled. The default theme 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 example:

{
  "copyright": "Remy Sharp, http://remysharp.com",
  "url": "http://remysharp.com",
  "theme": "flesch"
}

Current available themes:

Formats & URLs

The following types of requests can be made to this project:

The url also supports including a start year:

Finally, the url also supports pinning the year

Ways to contribute

Aside from code contributions that make the project better, there are a few other specific ways that you can contribute to this project.

Development contributions from:

SSL and wildcard DNS is supported by CloudFlare - thank you 🙏💙

1. Donate domain years

I host the domain with namecheap.com and yearly renewal is $9.69 per year. If you want to contribute a year, send me a message and I'll add the years on.

Of course I'll do my best to continue running the domain and hosting, but this is your chance to contribute to the community project.

Domain contributions:

Please note that the whois says 2021 as you can only have 10 active registered years with ICANN - but the domain is set to auto-renew, so it's all good :)

2. Hosting

For the first 5 years mit-license.org was hosted on my own dedicated server, but I've now moved to Heroku and am paying a monthly fee. If you would like to donate please donate here include a message and I will add your name to the credit. Hosting is currently costs $7 per month, if you want to donate in months or years, it's gratefully received ❤

Hosting contributions:

3. A lick of paint

I'm a developer, I seem only capable of grey! If you're a designer and want to contribute a decent lick of paint on the project that would be super. Just create a new theme and send me a pull request.

License

And of course:

MIT: http://rem.mit-license.org