HTML5 and XHTML 1.1

The xhtml11 and html5 backends embed or link CSS and JavaScript files in their outputs, there is also a themes plugin framework.

  • If the AsciiDoc linkcss attribute is defined then CSS and JavaScript files are linked to the output document, otherwise they are embedded (the default behavior).
  • The default locations for CSS and JavaScript files can be changed by setting the AsciiDoc stylesdir and scriptsdir attributes respectively.
  • The default locations for embedded and linked files differ and are calculated at different times — embedded files are loaded when asciidoc(1) generates the output document, linked files are loaded by the browser when the user views the output document.
  • Embedded files are automatically inserted in the output files but you need to manually copy linked CSS and Javascript files from AsciiDoc configuration directories to the correct location relative to the output document.
Table 1. Stylesheet file locations
stylesdir attribute Linked location (linkcss attribute defined) Embedded location (linkcss attribute undefined)
Undefined (default).
Same directory as the output document.
stylesheets subdirectory in the AsciiDoc configuration directory (the directory containing the backend conf file).
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 2. JavaScript file locations
scriptsdir attribute Linked location (linkcss attribute defined) Embedded location (linkcss attribute undefined)
Undefined (default).
Same directory as the output document.
javascripts subdirectory in the AsciiDoc configuration directory (the directory containing the backend conf file).
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).
Back to top