From ab3ee0061b49303a7b52010f5bd7fe9cc3d9e71a Mon Sep 17 00:00:00 2001
From: Mike Linksvayer
Date: Wed, 2 Mar 2016 18:23:31 -0800
Subject: [PATCH] take projects listed on homepage from license using property
---
_includes/license-overview.html | 2 +-
_includes/using-sentence.html | 17 +++++++++++++++++
_licenses/apache-2.0.txt | 5 +++++
_licenses/gpl-3.0.txt | 5 +++++
_licenses/mit.txt | 6 ++++++
index.html | 6 +++---
6 files changed, 37 insertions(+), 4 deletions(-)
create mode 100644 _includes/using-sentence.html
diff --git a/_includes/license-overview.html b/_includes/license-overview.html
index 83256fc..5f2622a 100644
--- a/_includes/license-overview.html
+++ b/_includes/license-overview.html
@@ -35,7 +35,7 @@
{% endif %}
-
+
{% if license.family %}
{% assign variations = site.licenses | where:"hidden",false | where:"family",license.family %}
{% else %}
diff --git a/_includes/using-sentence.html b/_includes/using-sentence.html
new file mode 100644
index 0000000..94bea5f
--- /dev/null
+++ b/_includes/using-sentence.html
@@ -0,0 +1,17 @@
+{% assign id = "/licenses/" | append: include.license-id %}
+{% assign licenses = site.licenses | where:"id", id %}
+{% for license in licenses %}
+ {% assign using = license.using %}
+ {% if using.size > 0 %}
+ {% for used in using limit: 3 %}
+ {% assign last = forloop.last %}
+ {% if last %}
+ and
+ {% endif %}
+ {% for hash in used %}
+ {{ hash[0] }}{% if last == false %},{% endif %}
+ {% endfor %}
+ {% endfor %}
+ use the {% if license.nickname %}{{ license.nickname }}{% else %}{{ license.title }}{% endif %}.
+ {% endif %}
+{% endfor %}
diff --git a/_licenses/apache-2.0.txt b/_licenses/apache-2.0.txt
index a6620da..caa405f 100644
--- a/_licenses/apache-2.0.txt
+++ b/_licenses/apache-2.0.txt
@@ -10,6 +10,11 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
note: The Apache Foundation recommends taking the additional step of adding a boilerplate notice to the header of each source file. You can find the notice at the very end of the license in the appendix.
+using:
+ - Android: https://github.com/android/platform_system_core/blob/master/NOTICE
+ - Apache: https://svn.apache.org/viewvc/httpd/httpd/trunk/LICENSE?view=markup
+ - Swift: https://github.com/apple/swift/blob/master/LICENSE.txt
+
required:
- include-copyright
- document-changes
diff --git a/_licenses/gpl-3.0.txt b/_licenses/gpl-3.0.txt
index ce6bc43..b31cd87 100644
--- a/_licenses/gpl-3.0.txt
+++ b/_licenses/gpl-3.0.txt
@@ -12,6 +12,11 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
note: The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the license.
+using:
+ - Bash: http://git.savannah.gnu.org/cgit/bash.git/tree/COPYING
+ - GIMP: https://git.gnome.org/browse/gimp/tree/COPYING
+ - Privacy Badger: https://github.com/EFForg/privacybadgerfirefox/blob/master/LICENSE
+
required:
- include-copyright
- document-changes
diff --git a/_licenses/mit.txt b/_licenses/mit.txt
index d90d699..7da1033 100644
--- a/_licenses/mit.txt
+++ b/_licenses/mit.txt
@@ -7,6 +7,12 @@ description: A permissive license that is short and to the point. It lets people
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.
+using:
+ - jQuery: https://github.com/jquery/jquery/blob/master/LICENSE.txt
+ - .NET Core: https://github.com/dotnet/corefx/blob/master/LICENSE
+ - Rails: https://github.com/rails/rails/blob/master/activerecord/MIT-LICENSE
+
+
required:
- include-copyright
diff --git a/index.html b/index.html
index 3240eb3..5cdfa7e 100644
--- a/index.html
+++ b/index.html
@@ -21,7 +21,7 @@ permalink: /
The MIT License is a permissive license that is short and to the point. It lets people do anything they want with your code as long as they provide attribution back to you and don’t hold you liable.
- jQuery, Rails and .NET Core use the MIT License.
+ {% include using-sentence.html license-id="mit" %}
@@ -33,7 +33,7 @@ permalink: /
The Apache License 2.0 is a permissive license similar to the MIT License, but also provides an express grant of patent rights from contributors to users.
- Apache, Swift, and Android use the Apache License 2.0.
+ {% include using-sentence.html license-id="apache-2.0" %}
@@ -45,7 +45,7 @@ permalink: /
The GNU GPLv3 is a copyleft license that requires anyone who distributes your code or a derivative work to make the source available under the same terms, and also provides an express grant of patent rights from contributors to users.
- Bash, GIMP, and Privacy Badger use the GNU GPLv3.
+ {% include using-sentence.html license-id="gpl-3.0" %}