The xhtml11 and html5 backends embed or link CSS and JavaScript files in their outputs, there is also a themes plugin framework.
asciidoc(1)
generates the output document, linked files are loaded
by the browser when the user views the output document.
Table 7.1. Stylesheet file locations
stylesdir attribute | Linked location (linkcss attribute defined) | Embedded location (linkcss attribute undefined) |
---|---|---|
Undefined (default). | Same directory as the output document. |
|
Absolute or relative directory name. | Absolute or relative to the output document. | Absolute or relative to the AsciiDoc configuration directory (the directory containing the backend conf file). |
Table 7.2. JavaScript file locations
scriptsdir attribute | Linked location (linkcss attribute defined) | Embedded location (linkcss attribute undefined) |
---|---|---|
Undefined (default). | Same directory as the output document. |
|
Absolute or relative directory name. | Absolute or relative to the output document. | Absolute or relative to the AsciiDoc configuration directory (the directory containing the backend conf file). |
The AsciiDoc theme attribute is used to select an alternative CSS stylesheet and to optionally include additional JavaScript code.
themes/<theme>/
(where <theme>
is the the theme name set
by the theme attribute). asciidoc(1)
sets the themedir attribute
to the theme directory path name.
asciidoc(1)
--theme
option, the --theme
option can also be used to manage
theme plugins.
<theme>.css
file replaces the default asciidoc.css
CSS file.
<theme>.js
file is included in addition to the default
asciidoc.js
JavaScript file.
icons
sub-directory if it exists (i.e. the
iconsdir attribute is set to theme icons
sub-directory path).
For example, the command-line option --theme foo
(or --attribute
theme=foo
) will cause asciidoc(1)
to search configuration file locations 1 for a sub-directory called themes/foo
containing the stylesheet foo.css
and optionally a JavaScript file
name foo.js
.