A lab for testing and demonstrating Asciidoctor extensions. Please do not use this code in production. If you want to use one of these extensions in your application, create a new project, import the code, and distribute it as a RubyGem. You can then request to make it a top-level project under the Asciidoctor organization.
Other
104
stars
101
forks
source link
Add a DocinfoProcessor to emit license information. #33
Often people will want to include a URL to the license for a document, and in some cases (e.g. Creative Commons licenses), it's obligatory. This provides an extension to process a license attribute that contains an HTTP or HTTPS URL. It doesn't handle non-URLs, because the elements in question don't support non-URLs, and it also allows one to write something like :license: http://opensource.org/licenses/MIT or http://opensource.org/licenses/BSD-2-Clause and have it do the right thing.
It also doesn't support DocBook 4, because DocBook 4 doesn't support embedding arbitrary elements in the *info sections.
Often people will want to include a URL to the license for a document, and in some cases (e.g. Creative Commons licenses), it's obligatory. This provides an extension to process a license attribute that contains an HTTP or HTTPS URL. It doesn't handle non-URLs, because the elements in question don't support non-URLs, and it also allows one to write something like
:license: http://opensource.org/licenses/MIT or http://opensource.org/licenses/BSD-2-Clause
and have it do the right thing.It also doesn't support DocBook 4, because DocBook 4 doesn't support embedding arbitrary elements in the *info sections.