Debian Codegraph @

docs/user_guide/performance.rst

raw
1
2 Build performance and size
3 ==========================
4
5 By default this theme includes all of your documentation links in a collapsible sidebar.
6 However, this may slow down your documentation builds considerably if you have a lot of documentation pages.
7 This is most common with documentation for projects with a large API, which use the ``.. autosummary::`` directive to generate API documentation.
8
9 To improve the performance of your builds in these cases, first try modifying the navigation depth in the sidebar (see :ref:`navigation-depth`).
10 If that doesn't work, try the fix in the section below.
11
12 .. _remove_toctrees:
13
14 Selectively remove pages from your sidebar
15 ------------------------------------------
16
17 You can prevent pages from showing up in the navigation bar using a Sphinx
18 extension called `sphinx-remove-toctrees <https://github.com/executablebooks/sphinx-remove-toctrees>`_.
19 This is useful if your documentation generates lots of "stub pages" in a folder,
20 which is common with API documentation.
21
22 This lets you add a configuration like so:
23
24 .. code-block::
25
26 remove_from_toctrees = ["folder_one/generated/*"]
27
28 and any pages that are inside of ``folder_one/generated/`` will not show up in the sidebar.
29
30 Check out the `sphinx-remove-toctrees documentation <https://github.com/executablebooks/sphinx-remove-toctrees#install>`_
31 for information about how to install and use this extension.