As in the standalone html builder the navigation is flattened out for
every single html page, the code needs to create a specialised
toctree for every html page. Previously this was done by deep-copying
the complete navigation toctree and then stripping out the parts not
needed on the particular page. With this change the code only
(deep)-copies the needed parts of the toctree avoiding unnecessary
copying and throwing-away. The performance improvements seems to be
smaller for smaller page counts and get bigger the more pages are
involved.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
The link relationship keyword `shortcut` does not appear in the HTML 5 specification [1].
It was used by historic browsers (i.e. Internet Explorer 6) which Sphinx no longer supports.
[1]: HTML5 Specification, 4.6.7.8 Link type "icon", https://html.spec.whatwg.org/#rel-icon
``SIM300`` is 'yoda conditions' [0]. These have already been fixed in
this repo, but we might as well add the lint to prevent them being
inadvertently re-added.
[0]: https://github.com/MartinThoma/flake8-simplify#SIM300
It seems the original PR adding multi word key support forgot to add
commas and python helpfully just concatenated the strings instead of
building the required tuples.
Code related to ``ngettext`` (support for n-ary / plural forms of
translated text) doesn't appear to be used, so this commit cleans up
the code by removing the ``ngettext`` reference.
Detail
------
- ``ngettext`` allows an application to provide a dynamic number
(often a count of items, like '5' in ``the linter produced 5
warnings``) to the translation query so that a plurality-relevant
message can be retrieved from the catalogue.
- ``sphinx`` has previously used this within its own codebase, but no
longer does -- ``babel`` command-line extraction [1] is used to
retrieve translatable resources from the codebase, and extraction
of plural-form keywords is not configured (nor easy to enable, as
far as I could tell).
- As a result it seems like it may make sense to remove the code.
[1]: https://babel.pocoo.org/en/latest/cmdline.html#extract