Document Structure

http://www.methods.co.nz/asciidoc/userguide.html#_document_structure

Table of Contents

Backend Attributes

Name Description

navinfo, navinfo1, navinfo2

These three attributes control which navigation information files will be included in the output file:

navinfo
Include <filename>-navinfo.html
navinfo1
Include navinfo.html
navinfo2
Include navinfo.html and <filename>-navinfo.html

Where <filename> is the file name (without extension) of the AsciiDoc input file.

The following example will build a Bootstrap 2 version and include the mydoc-navinfo.html navinfo file in the HTML output file:

$ asciidoc -b bootstrap -a bsver=2 -a navinfo mydoc.txt

This next example will build a Bootstrap 2 version and include navinfo.html and mydoc-navinfo.html navinfo files in the HTML output file:

$ asciidoc -b bootstrap -a bsver=2 -a navinfo2 mydoc.txt

This next example will build a Bootstrap 3 version and include navinfo.bs3.html and mydoc-navinfo.bs3.html navinfo files in the HTML output file:

$ asciidoc -b bootstrap -a bsver=3 -a navinfo2 mydoc.txt

footer

This attribute control which footer informations will be included in the output file:

If not defined, then it will be the default footer with the version and last updated informations.

footer
Include footer.html

The following example will build a Bootstrap 2 version and include the footer.html file in the HTML output file:

$ asciidoc -b bootstrap -a bsver=2 -a footer mydoc.txt

The next example will build a Bootstrap 3 version and include the footer.bs3.html file in the HTML output file:

$ asciidoc -b bootstrap -a bsver=3 -a footer mydoc.txt

totop

This attribute control which back to top system you want to include in the output file.

text
Include a Back to top standard html href link
ui
Used the UItoTop jQuery plugin.

The following example will build a Bootstrap 2 version and include the standard href link in the HTML output file:

$ asciidoc -b bootstrap -a bsver=2 -a totop=text mydoc.txt

The next example will build a Bootstrap 3 and include a dynamic clickable area in the HTML output file:

$ asciidoc -b bootstrap -a bsver=3 -a totop=ui mydoc.txt

brandver

This attribute control whether you want to include a dynamic versions list in the output file. A versions.html file must exists.

The following example will build a Bootstrap 2 and include a static versions list, identified by the navinfo.html, in the HTML output file:

$ asciidoc -b bootstrap -a bsver=2 -a brandver mydoc.txt

The next example will build a Bootstrap 3 and do not include a static versions list, identified by the navinfo.html, in the HTML output file (default behavior):

$ asciidoc -b bootstrap -a bsver=3 -a brandver! mydoc.txt

Examples

Example of Bootstrap 2 left navigation menu: document-structure-navinfo.html
            <ul class="nav">
                <li>
                    <a href="macros.html"><i class="icon-forward"></i> Macros</a>
                </li>
            </ul>
Example of Bootstrap 3 left navigation menu: document-structure-navinfo.bs3.html
            <ul class="nav navbar-nav">
                <li>
                    <a href="macros.html"><span class="glyphicon glyphicon-forward"></span> Macros</a>
                </li>
            </ul>
Example of Bootstrap 2 right navigation menu: navinfo.html
            <ul class="nav pull-left">
                <li class="dropdown">
                    <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-tag"></i> Versions <b class="caret"></b></a>
                    <ul class="dropdown-menu" id="dropdown-menu-versions" role="menu" aria-labelledby="drop1">
                    </ul>
                </li>
                <li>
                    <a href="index.html"><i class="icon-home"></i> Home</a>
                </li>
            </ul>
            <ul class="nav pull-right">
                <li class="dropdown">
                    <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-globe"></i> Links <b class="caret"></b></a>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
                        <li><a tabindex="-1" href="http://www.methods.co.nz/asciidoc/">AsciiDoc</a></li>
                        <li><a tabindex="-1" href="http://getbootstrap.com">Bootstrap</a></li>
                        <li class="divider"></li>
                        <li><a tabindex="-1" href="https://github.com/llaville/asciidoc-bootstrap-backend">AsciiDoc Bootstrap Backend by Laurent Laville</a></li>
                        <li><a tabindex="-1" href="https://github.com/mojavelinux/asciidoc-bootstrap-docs-backend">AsciiDoc Bootstrap Backend by Dan Allen</a></li>
                     </ul>
                </li>
            </ul>
Example of Bootstrap 3 right navigation menu: navinfo.bs3.html
            <ul class="nav navbar-nav">
                <li class="dropdown">
                    <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-tag"></span> Versions <b class="caret"></b></a>
                    <ul class="dropdown-menu" id="dropdown-menu-versions" role="menu" aria-labelledby="drop1">
                    </ul>
                </li>
                <li>
                    <a href="index.html"><span class="glyphicon glyphicon-home"></span> Home</a>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-globe"></span> Links <b class="caret"></b></a>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
                        <li><a tabindex="-1" href="http://www.methods.co.nz/asciidoc/">AsciiDoc</a></li>
                        <li><a tabindex="-1" href="http://getbootstrap.com">Bootstrap</a></li>
                        <li class="divider"></li>
                        <li><a tabindex="-1" href="https://github.com/llaville/asciidoc-bootstrap-backend">AsciiDoc Bootstrap Backend by Laurent Laville</a></li>
                        <li><a tabindex="-1" href="https://github.com/mojavelinux/asciidoc-bootstrap-docs-backend">AsciiDoc Bootstrap Backend by Dan Allen</a></li>
                     </ul>
                </li>
            </ul>
Example of Bootstrap 2 footer file: footer.html
<div class="row">
    <div class="span4">
        <ul class="nav nav-list">
            <li class="nav-header"><i class="icon-tag"></i> About</li>
            <li><a href="CHANGELOG.html">Changelog</a></li>
        </ul>
    </div>
    <div class="span4">
        <ul class="nav nav-list">
            <li class="nav-header"><i class="icon-book"></i> Get Started</li>
            <li><a href="get-started.html">Overview</a></li>
        </ul>
    </div>
    <div class="span4">
        <ul class="nav nav-list">
            <li class="nav-header"><i class="icon-comment"></i> Get Help</li>
            <li><a href="https://github.com/llaville/asciidoc-bootstrap-backend/issues">Report an issue</a></li>
        </ul>
    </div>
</div>
<div class="row">
    <div class="span12">
        <div id="footer-text">
            Version <span class="badge">{revnumber}</span><br>
            Last updated {docdate} {doctime}<br>
            Built with <a href="https://github.com/llaville/asciidoc-bootstrap-backend">AsciiDoc-Bootstrap backend</a> {bootstrap-backend-version}
        </div>
        <div id="footer-badges">
            Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a>
            and <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>.
        </div>
    </div>
</div>
Example of Bootstrap 3 footer file: footer.bs3.html
<div class="row">
    <div class="col-md-4">
        <ul class="nav nav-list">
            <li class="nav-header"><span class="glyphicon glyphicon-tag"></span> About</li>
            <li><a href="CHANGELOG.html">Changelog</a></li>
        </ul>
    </div>
    <div class="col-md-4">
        <ul class="nav nav-list">
            <li class="nav-header"><span class="glyphicon glyphicon-book"></span> Get Started</li>
            <li><a href="get-started.html">Overview</a></li>
        </ul>
    </div>
    <div class="col-md-4">
        <ul class="nav nav-list">
            <li class="nav-header"><span class="glyphicon glyphicon-comment"></span> Get Help</li>
            <li><a href="https://github.com/llaville/asciidoc-bootstrap-backend/issues">Report an issue</a></li>
        </ul>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <div id="footer-text">
            Version <span class="badge">{revnumber}</span><br>
            Last updated {docdate} {doctime}<br>
            Built with <a href="https://github.com/llaville/asciidoc-bootstrap-backend">AsciiDoc-Bootstrap backend</a> {bootstrap-backend-version}
        </div>
        <div id="footer-badges">
            Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a>
            and <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>.
        </div>
    </div>
</div>