docs(source): Reduce white space in toc tree

Description

Abstract

In the toc tree of the “Packages” section, reduce the space above and below the “sub packages”.

Also raise the depth of displayed sub packages from 4 to 6.

Motivation

Readability in documentation is important and there was too much whitespace, and not enough depth.

Rationale

For the white space, we simply removed the margin in sub ul elements.

For the toc tree depth, we passed it when calling apidoc

Info

Hash

2048c4358fd11fb703090fdd85bb158944bf5828

Date

2020-09-26 12:29:40 +0200

Parents
  • docs(examples): Add examples in functions docstring [74b050b5]2020-09-26 12:03:01 +0200

Children
  • Merge branch ‘feature/twidi/enhance-source-doc’ into develop [60b07af0]2020-09-26 13:10:58 +0200

Branches
Tags

(No tags)

Changes

docs/_static/css/custom.css

Type

Modified

Stats

+4 -0

@@ -42,6 +42,10 @@ p.rubric.package-sub + .toctree-wrapper {
     margin-left: 6px;
     padding-top: 6px;
 }
+div#packages > h1 + .toctree-wrapper ul ul, p.package-sub  + .toctree-wrapper ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
 /* Add emphasis to the first line of docstring of packages and modules */
 .package-or-module-title + .section > span.target:first-of-type + p,  /* package with no content */
 .package-or-module-title + .section > span + h1:first-of-type + p, /* package with content */

docs/conf.py

Type

Modified

Stats

+2 -0

@@ -111,6 +111,8 @@ def run_apidoc(_):
             "--force",
             "--module-first",
             "--separate",
+            "-d",  # maxdepth
+            "6",
             "--doc-project",
             "Packages",
             "--templatedir",