From 08f869f01113b2aea6a6b9402b8fc6a0b291b3ae Mon Sep 17 00:00:00 2001 From: Tarek Lokal Date: Sat, 11 Jul 2026 12:41:26 +0200 Subject: [PATCH] Add related licenses sidebar (#389) Optional related front matter, partial, and links on MIT/GPL/LGPL pages. Co-authored-by: Cursor --- _data/meta.yml | 5 +++++ _includes/related-licenses.html | 18 ++++++++++++++++++ _includes/sidebar.html | 2 ++ _licenses/gpl-2.0.txt | 5 +++++ _licenses/lgpl-2.1.txt | 5 +++++ _licenses/mit.txt | 5 +++++ 6 files changed, 40 insertions(+) create mode 100644 _includes/related-licenses.html diff --git a/_data/meta.yml b/_data/meta.yml index 61d7160ee..efc312af4 100644 --- a/_data/meta.yml +++ b/_data/meta.yml @@ -51,6 +51,11 @@ description: Additional information about the licenses required: false + +- name: related + description: Optional list of related license slugs (lowercase SPDX-derived filenames without .txt) shown in the sidebar + required: false + - name: redirect_from description: Relative path(s) to redirect to the license from, to prevent breaking old URLs required: false diff --git a/_includes/related-licenses.html b/_includes/related-licenses.html new file mode 100644 index 000000000..b1cbcb27d --- /dev/null +++ b/_includes/related-licenses.html @@ -0,0 +1,18 @@ +{% if page.related and page.related.size > 0 %} + +{% endif %} diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 414c19106..f95622a08 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -54,4 +54,6 @@

Who’s using this license?

{% endif %} + {% include related-licenses.html %} + diff --git a/_licenses/gpl-2.0.txt b/_licenses/gpl-2.0.txt index 0d0a17a00..6728b5fca 100644 --- a/_licenses/gpl-2.0.txt +++ b/_licenses/gpl-2.0.txt @@ -11,6 +11,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. +related: + - gpl-3.0 + - agpl-3.0 + - eupl-1.2 + using: Discourse: https://github.com/discourse/discourse/blob/master/LICENSE.txt Jellyfin: https://github.com/jellyfin/jellyfin/blob/master/LICENSE diff --git a/_licenses/lgpl-2.1.txt b/_licenses/lgpl-2.1.txt index 6ffdad8cb..f8dc51dbd 100644 --- a/_licenses/lgpl-2.1.txt +++ b/_licenses/lgpl-2.1.txt @@ -11,6 +11,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. +related: + - lgpl-3.0 + - mpl-2.0 + - lgpl-2.0 + using: permissions: diff --git a/_licenses/mit.txt b/_licenses/mit.txt index 1ad0488f9..360160efb 100644 --- a/_licenses/mit.txt +++ b/_licenses/mit.txt @@ -8,6 +8,11 @@ description: A short and simple permissive license with conditions only requirin 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. +related: + - bsd-2-clause + - bsd-3-clause + - isc + using: Babel: https://github.com/babel/babel/blob/master/LICENSE .NET: https://github.com/dotnet/runtime/blob/main/LICENSE.TXT