The AsciiDoc theme attribute is used to select an alternative CSS stylesheet and to optionally include additional JavaScript code.
- Theme files reside in an AsciiDoc configuration directory named
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. - The theme attribute can also be set using the asciidoc(1)
--theme
option, the--theme
option can also be used to manage theme plugins. - AsciiDoc ships with two themes: flask and volnitsky.
- The
<theme>.css
file replaces the defaultasciidoc.css
CSS file. - The
<theme>.js
file is included in addition to the defaultasciidoc.js
JavaScript file. - If the data-uri attribute is defined then icons are loaded from the theme
icons
sub-directory if it exists (i.e. the iconsdir attribute is set to themeicons
sub-directory path). - Embedded theme files are automatically inserted in the output files but you need to manually copy linked CSS and Javascript files to the location of the output documents.
- Linked CSS and JavaScript theme files are linked to the same linked locations as other CSS and JavaScript files.
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
.