File: search-input.md

package info (click to toggle)
sphinx-basic-ng 1.0.0~beta2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 504 kB
  • sloc: python: 179; makefile: 5
file content (23 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Search input

Sphinx provides offline search to allow users to search the generated
documentation.

## Usage

```jinja
{% include "components/search-input.html" %}
```

This will add a single `form.search-container`, containing a single
`input.search-input` with the translated placeholder text: "Search". Pressing
{kbd}`Enter` in this element redirects the user to the search page, with the
appropriate query parameters.

```{important}
Sphinx's search JS looks inside elements with `[role="main"]`, so make sure that all user provided content is within an element with that attribute.
```

## Configurability

None.