Getting Started

Overview of the project, its contents, and how to get started with your own theme.

Download

Download the asciidoc backend

Download version 3.3.0

Install as any other plugins:

$ asciidoc --backend install bootstrap-<version>.zip
<version> is to be replaced by the latest version available of the backend.

The Asciidoc bootstrap backend standard version included :

  • version 2.3.2 ( themes/2 ) and 3.1.0 ( themes/3 ) of the default theme from Bootswatch template provider.

  • version 2.3.2 ( bootstrap/2 ) and 3.1.1 ( bootstrap/3 ) of Bootstrap.

  • version 4.0.3 ( fonts/font-awesome/ ) of Font-Awesome.

You can download additional themes AsciiDoc-Bootstrap backend v3 ready.

Figure 1. Flatly theme
Figure 2. Readable theme
Figure 3. Cerulean theme

Extract archive contents in themes/2/ or themes/3/ folder of the backend distribution.

File structure

When you will installed the asciidoc bootstrap backend, you will find the following file structure and contents.

 bootstrap/
  ├── bootstrap/
  │   ├── 2/
  │   │   ├── css/
  │   │   ├── js/
  │   │   └── img/
  │   └── 3/
  │       ├── css/
  │       ├── js/
  │       └── fonts/
  ├── docs/
  ├── examples/
  ├── images/
  │   ├── icons/
  │   │   ├── apple-touch-icon-57-precomposed.png
  │   │   ├── apple-touch-icon-72-precomposed.png
  │   │   ├── apple-touch-icon-114-precomposed.png
  │   │   ├── apple-touch-icon-144-precomposed.png
  │   │   ├── ui.totop.png
  │   │   └── favicon.ico
  ├── javascripts/
  │   ├── asciidoc.js
  │   ├── jquery.min.js
  │   └── jquery.ui.totop.min.js
  ├── stylesheets/
  │   ├── asciidoc-bootstrap.css
  │   ├── ui.totop.css
  │   ├── iconfonts-bootstrap.css
  │   ├── pygments-bootstrap.css
  │   └── pygments.monokai.css
  │   └── pygments.pastie.css
  │   └── pygments.css
  ├── fonts/
  │   └── font-awesome/
  └── themes
      ├── 2/
      │   ├── img/
      │   └── default/
      │       ├── bootstrap.css
      │       ├── bootstrap.min.css
      │       ├── default.css
      │       ├── default.js
      │       └── user.css
      └── 3/
          ├── fonts/
          └── default/
              ├── bootstrap.css
              ├── bootstrap.min.css
              ├── default.css
              ├── default.js
              └── user.css
The default theme follow the basic look and feel of Bootstrap 2 or 3

Attributes

Specifics bootstrap backend attributes

Name Description
bootstrapdir The name of the directory containing the boostrap compiled version resources.
sidebar The TOC can be place on a sidebar on left (default value) or right of the main document body.
brand A simple link to show your brand or project name
brandref A link to the main page of your project. By default it’s a simple anchor #
brandver Control display of a dynamic versions list of your project.
navinfo, navinfo1, navinfo2 Control which navigation information files will be included in the output file.
footer Control which footer informations will be included in the output file.
totop Control which back to top system you want to include in the output file.
jumbotron Enhance the title of the document.
jumbotron-fullwidth Enhance the title of the document with a full width jumbotron in all resolution.
navbar Define the style of navigation bar: default (default value), fixed or static.
navbar-inverse Inverted variation of the basic navbar.
pygments-style Change the Pygments style. Default theme is emacs with a variant background: the one provided by AsciiDoc.
iconsfont The name of the icons font provider: either glyphicon, font-awesome, ionicons or icomoon.
iconsfontdir The name of the directory containing linked icons stylesheets and fonts files.
rssref Specify an URL of RSS feed to be linked with output document.
favicon Add a link to your favorite icon
tocaffix Use Bootstrap affix plugin to pin the TOC2 on left or right side triggered at offset specified.

Your own theme

The AsciiDoc theme attribute is used to select an alternative CSS stylesheet and to optionally include additional JavaScript code.

  • Theme files are located by default (in the distribution) from the configuration directory named themes/<bsver>/<theme>/ (where <theme> is the the theme name set by the theme attribute, and <bsver> identify the major Bootstrap version (2 or 3).

  • The <theme>.css file replaces some declarations from the standard (bootswatch) theme.

  • The user.css empty file is available for you to make your own changes.

  • The <theme>.js file is included in addition to the default asciidoc.js JavaScript file.

What is next?

Head to the docs sections for more information and examples.

Source Code Highlight

The Pygments syntax highlighter can be used for xhtml11, html5 and bootstrap outputs.

Since version 3.1.0 you have ability to use any of the Pygments 1.5 themes provided at document build time.

Text Formatting

Words and phrases can be formatted by enclosing inline text with quote characters.

Delimited Blocks

Delimited blocks are blocks of text enveloped by leading and trailing delimiter lines

Paragraphs

Paragraphs are blocks of text terminated by a blank line, the end of file, or the start of a delimited block or a list. There are three paragraph syntaxes: normal, indented (literal) and admonition which are rendered, by default, with the corresponding paragraph style.

Document Structure

AsciiDoc has two mechanisms for optionally including additional meta-data in the header of the output document.

Like the docinfo attribute, bootstrap backend add support to dropdowns navigation bar with to new navinfo attribute.

Callouts

Callouts are a mechanism for annotating verbatim text (for example: source code, computer output and user input). Callout markers are placed inside the annotated text while the actual annotations are presented in a callout list after the annotated text.

Macros

Macros are a mechanism for substituting parametrized text into output documents.

Macros have a name, a single target argument and an attribute list.

Inline Macros occur in an inline element context. Predefined Inline macros include image and link macros.