diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-10-14 03:38:21 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-10-14 03:38:21 -0600 |
| commit | 8a916d52a966dfc55b7a1888831a64140b7e1a59 (patch) | |
| tree | b4cbd84e9d77d1a02046fc962de9fd14d19bdcce /docs | |
| parent | f80441fd2ad46439cce19bf54581eb9d79097f3d (diff) | |
add docinfo example of defining license link tag in HTML head
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/modules/ROOT/pages/docinfo.adoc | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/docs/modules/ROOT/pages/docinfo.adoc b/docs/modules/ROOT/pages/docinfo.adoc index 9b109ef3..4fda9a24 100644 --- a/docs/modules/ROOT/pages/docinfo.adoc +++ b/docs/modules/ROOT/pages/docinfo.adoc @@ -231,7 +231,7 @@ The value of this attribute defaults to `attributes`. For example, if you created the following docinfo file: -.Docinfo file containing a revnumber attribute reference +.Docinfo file (docinfo.xml) containing a revnumber attribute reference [source,xml] ---- <edition>{revnumber}</edition> @@ -240,7 +240,7 @@ For example, if you created the following docinfo file: And this source document: .Source document including a revision number -[source,asciidoc] +[,asciidoc] ---- = Document Title Author Name @@ -252,7 +252,8 @@ v1.0, 2020-12-30 Then the converted DocBook output would be: -[source,xml] +.Converted DocBook containing the docinfo +[,xml] ---- <?xml version="1.0" encoding="UTF-8"?> <book xmlns="http://docbook.org/ns/docbook" @@ -278,3 +279,29 @@ Then the converted DocBook output would be: </book> ---- <.> The revnumber attribute reference was replaced by the source document's revision number in the converted output. + +Another example is if you want to define the the licence link tag in the HTML head. + +.Docinfo file (docinfo.html) containing a license meta tag +[,html] +---- +<link rel="license" href="{license-url}" title="{license-title}"> +---- + +Now define these attributes in your AsciiDoc source: + +.Source document that defines license attributes +[,asciidoc] +---- += Document Title +:license-url: https://mit-license.org +:license-title: MIT +---- + +Then the `<head>` tag in the converted HTML would include: + +.Rendered license link tag in HTML output +[,html] +---- +<link rel="license" href="https://mit-license.org" title="MIT"> +---- |
