[docs] [issue19489] move quick search box above TOC

Ammar Askar report at bugs.python.org
Sat Jul 23 21:28:18 EDT 2016


Ammar Askar added the comment:

Thank you for pointing that out to me, it completely slipped past.

It looks like the 'Report a Bug' link disappears because deprecated api is used in Doc/tools/templates/layout.html

{% block sidebarsourcelink %}
{% endblock %}

http://www.sphinx-doc.org/en/stable/templating.html#blocks

>The following four blocks are only used for pages that do not have
>assigned a list of custom sidebars in the html_sidebars config
>value"

I've amended the patch to fix this by using the way they recommend with a custom html_sidebar.


As far as putting it in the title bar goes, I think it's slightly more prone to breakage since we're essentially duplicating sphinx's searchbar code. It's easy enough to add it to the right of those links, there's a {% block relbaritems %} for that. Adding it to the left is slightly more complicated. Personally I like just pinning it to the top of the sidebar but I can look into that as well if you really want. 
https://github.com/sphinx-doc/sphinx/blob/master/sphinx/themes/basic/layout.html#L27-L46

----------
Added file: http://bugs.python.org/file43848/searchbar.diff2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19489>
_______________________________________


More information about the docs mailing list