-
-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata: license #4366
Comments
There's definitely nothing stopping you from doing this. If you want this to be propagated to the built-in HTML converter, you'd need to use the attribute name UPDATE: I now realize that by using copyright, it would end up putting the license text in the copyright meta tag, which is not really correct. So that's not the right recommendation. |
Ah ha. I hadn't seen this one and it didn't come up in my search. |
Seems there's a |
I now recall why we have not yet implemented this. The license meta tag is a link to a license, not arbitrary text. And it's just not clear how exactly that's going to work. If you can provide a more complete example, we might be able to consider it. |
In the context of a lot of projects, you may just be linking With the w3 spec (https://html.spec.whatwg.org/multipage/links.html#link-type-license) says historically The link should still point to either the exact license like So my new spitball'd idea borrowing from https://asciidoctor.org/ would be: = My Document
:author: toastal
:copyright: © Copyright {author} 2022
:license: CC BY-SA 4.0 <https://creativecommons.org/licenses/by-sa/4.0/> <head>
<title>My Document</title>
<meta name="author" content="toastal">
<meta name="copyright" content="© Copyright toastal 2022">
<link rel="license"title="CC BY-SA 4.0" href="https://creativecommons.org/licenses/by-sa/4.0/">
</head>
<body>
<!-- ... -->
<footer id="footer">
<p>
<small id="copyright">© Copyright toastal 2022<small><br>
<small id="license">Content licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY 4.0</a></small>
</p>
</footer>
</body> or :license: 0BSD </LICENCE.txt> <link rel="license" title="0BSD" href="/LICENSE.txt">
<small id="license">Content licensed under <a href="/LICENSE.txt">0BSD</a></small> so... :license: LABEL OR SHORT CODE <URL TO LICENSE> It seems parentheses are common enough in license names that it's not a good sigil pair. I would consider it a failure and invalid parse without the This said and while aesthetically less pleasing, it has emerged that it would be smarter to make the URL go first as a requirement and the label inside some sigil pair or everything that follows the URL, as a :license: <URL TO LICENSE> <LABEL OR SHORT CODE> :license: /LICENCE.txt OBSD <link rel="license" title="0BSD" href="/LICENSE.txt">
<small id="license">Content licensed under <a href="/LICENSE.txt">0BSD</a></small> :license: /LICENCE.txt <link rel="license" href="/LICENSE.txt">
<small id="license">Content licensed under <a href="/LICENSE.txt">/LICENSE.txt</a></small> and/or you could be even more creative :license: /LICENCE.txt BSD Zero Clause License <OBSD> <link rel="license" title="BSD Zero Clause License" href="/LICENSE.txt">
<small id="license">Content licensed under <a href="/LICENSE.txt"><abbr title="BSD Zero Clause License">0BSD</abbr></a></small> |
Thanks for providing that analyze. Lots of interesting stuff in there. I could definitely get behind the syntax:
The It seems as though you're asking for both a metadata tag ( |
I'd like to clarify that this is achievable today using docinfo. Here's how that would work. First, you'd define a pair of attributes in your document.
Then you'd define docinfo.html as follows:
Then you'd define docinfo-footer.html as follows:
This might make a nice addition to the docs. It's not as nice as having support for a |
The more I think about this though, I don't think the SPDX identifier, while common in programming circles, should be the a user's goto or recommended, but instead the full license name like I will definitely look at the docinfo file docs and see if it can solve some of my immediate problems. |
The nice part about this proposal is that it doesn't require it. Because of how the license metadata tag is specified, the URL is required. But the text can be anything that will go in the title attribute. That's why I think it makes sense to put the required part first. |
I'd like to be able to specify a license for a document. Ideally it would be in the format like:
The text was updated successfully, but these errors were encountered: