Fixes for search on docs site

We previously didn't include the search results page in our CI testing,
so we missed some issues on that page. This ensures that page is part of
regular testing, and also includes fixes for the issues present.
This commit is contained in:
Jonathan Wren 2020-12-28 12:25:12 -08:00
parent 31ada29a37
commit 82e31f1dd4
No known key found for this signature in database
GPG key ID: 43D5FF8722E7F68A
5 changed files with 87 additions and 15 deletions

View file

@ -1,8 +1,12 @@
{% extends "base.html" %}
{% block search_button %}
<form class="mkdocs-search" action="{{ base_url }}/search.html">
<input type="text" name="q" placeholder="Search docs" title="Type search term here">
<button class="icon icon-search" aria-label="submit"></button>
</form>
{% endblock %}
{%- block search_button %}
{% if 'search' in config['plugins'] %}
<div role="search">
<form id ="rtd-search-form" class="wy-form mkdocs-search" action="{{ base_url }}/search.html" method="get">
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
<button class="icon icon-search" aria-label="submit"></button>
</form>
</div>
{% endif %}
{%- endblock %}