Closed fwkoch closed 1 month ago
Latest commit: a5b68710c378c322a41d2556c21560b0f57255d6
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Went through this with Franklin! Looking good, and opens up a lot more possibilities to support real-world use cases for capturing license information.
Currently
license
values in MyST frontmatter are strict. They must be from the SPDX license list, referenced by ID, with no extra, custom information. This is probably how licenses should be used - just pick a good, existing one and stick with that, don't try to embellish it or make up your own. However, in reality, this is not the case. Publishers, authors, etc often have their own license notes, urls for their license policies, or entirely new licenses.This PR updates license validation in MyST to enable more flexibility when defining license.
First, you may define a license as an SPDX ID, as before. The behavior for this is unchanged: it will be automatically expanded to contain all the relevant license metadata, including name, url, OSI status, etc:
And, as before, you may still separate
content
andcode
licenses - again, no changes to this.However, you may now add your own
note
- in this case, other metadata will still be populated as before, alongside your note:You may also override metadata fields - in this case, the new
url
will be used, but other metadata will be populated as before:Finally, you may define your own totally new license:
Note, in cases all where you (1) do not use an SPDX license or (2) override default SPDX fields, MyST will raise a warning.