Add TOC to installation instructions

This adds a Table of Contents to the installation instructions to
improve the navigation within the document.

I decided to use the command line to configure the TOC because there
were problems with using just using an attribute entry in the document
header.
Specifically the insertion of the `header.asciidoc` into the resulting
HTML file prevented the attribute entry approach from working.

The TOC can now be inserted into any doc file using

    toc::[]
This commit is contained in:
Philipp Hansch 2017-05-29 21:14:01 +02:00
parent a48ea597d0
commit abd3333b9f
No known key found for this signature in database
GPG Key ID: 667C8F4B5A698A60
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
Installing qutebrowser
======================
toc::[]
On Debian / Ubuntu
------------------

View File

@ -184,7 +184,7 @@ class AsciiDoc:
with open(modified_src, 'w+', encoding='utf-8') as final_version:
final_version.write(title + "\n\n" + header + current_lines)
self.call(modified_src, dst, '--theme=qute')
self.call(modified_src, dst, '--theme=qute', '-a toc', '-a toc-placement=manual')
def _build_website(self):
"""Prepare and build the website."""