Adding content to the TOC Tree

You’ll probably want to start writing documentation and organize your site already, so get started by creating a docs folder inside your project folder.

mkdir docs

Then you’ll want to add either only the indexes for each section (which gets referenced as a separate) or the entire folder (which means every section and sub-section will be separated).

Here’s an example of the table of contents tree for this site.

.. toctree::
    :glob:
    :numbered:
    :maxdepth: 2

    docs/Auto-loader/00*
    docs/DRBD9.x/00*
    docs/Proxmox VE/00*
    docs/Samba DNS/00*
    docs/Samba Share/00*
    docs/Ubuntu Server/00*
    docs/ZABBIX/00*

You’ll need to include any subdirs you wish to have in the TOC to that section.

Since I wanted the site to be neat I chose to use an include in the index file for each sub-section (e.g.: Proxmox) so that all the content is in one single page.

Here’s an example

.. ubuntu index file for organization

.. highlight:: shell

*********
Ubuntu Server
*********

Documentation on Ubuntu Server Tweaks and Tricks for more optimized configurations.

.. include:: ./01-ubu-revert-netplan.rst
.. include:: ./03-ubu-join-ad.rst
.. include:: ./04-ubu-legacy-eth.rst
.. include:: ./05-ubu-lvm-extend.rst

**********
Cloud-Init (Ubuntu)
**********

For Cloud-Init specific issues.

.. include:: ./02-ubu-cinit-hostname-force.rst
.. include:: ./06-ubu-cinit-setup.rst