From: Ben Kaduk Date: Tue, 27 Nov 2012 18:31:34 +0000 (-0500) Subject: Do not generate unused parts of toctree X-Git-Tag: krb5-1.12-alpha1~435 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81fc0331cdf8a41b346daaee32977d76ab645139;p=thirdparty%2Fkrb5.git Do not generate unused parts of toctree Our css only displays up to depth 3 of the toctree, partially because the API reference content explodes at depth 4 and that would not be pretty to see in the sidebar. However, we would previously always generate HTML for the full toctree and hide parts with CSS. For the apiref, this proved to be about 65k per html file, and we have one html file per function/type/macro. Limit the depth of the toctree that gets generated to save on space in the release tarball. Unfortunately, there seems to be a Sphinx bug wherein the toctree will only be generated to depth 1 for a document at a depth greater than the maxdepth of the toctree, so the sidebar table of contents on individual apiref pages will just be the toplevel toctree. This issue is being tracked at https://bitbucket.org/birkenfeld/sphinx/issue/1046/ ticket: 7466 (new) tags: pullup target_version: 1.11 --- diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index 585e6c560b..1822304a4b 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -66,7 +66,7 @@ {{ toc }}

{{ _('Table of contents') }}

- {{ toctree(collapse=true, maxdepth=-1, titles_only=true) }} + {{ toctree(collapse=true, maxdepth=3, titles_only=true) }}

Full Table of Contents