summaryrefslogtreecommitdiff
path: root/docs/_templates/searchbox.html
blob: 5fdd378f7c27d653c766bba1525d42af3318eeaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{#- Full override (sphinx_rtd_theme/layout.html does a plain {% include "searchbox.html" %},
   not a named block, so there is nothing to {% extends %} + {% block %} here). Only mounts
   the Pagefind UI on CF-Workers builds (conf.py sets html_context['vyos_cf_build'] from
   DOCS_VERSION_SLUG) — ReadTheDocs runs plain Sphinx with no Pagefind step, so the mount's
   assets would 404 there. On RTD (and any other non-CF build) fall through to the theme's
   stock server-side search form via Sphinx's "!" bang-prefix (forces resolution from the
   theme, bypassing this override, per sphinx/jinja2glue.py). #}
{% if vyos_cf_build %}
<div id="vyos-search" role="search"></div>
<noscript>{% include "!searchbox.html" %}</noscript>
{% else %}
{% include "!searchbox.html" %}
{% endif %}