@nera-static/nera 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -22,12 +22,16 @@ JSON index, a small script searches it in the browser. No backend.
|
|
|
22
22
|
include /vendor/plugin-search/search.pug
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
4. `pages/search.md` with `layout: pages/search.pug
|
|
26
|
-
|
|
25
|
+
4. `pages/search.md` with `layout: pages/search.pug`, a `title` and a
|
|
26
|
+
`# Search` heading, and `show_title: false` in `config/search.yaml`, so
|
|
27
|
+
that heading is the page's only `h1` (without the key the template adds
|
|
28
|
+
its own and `nera build --check` warns `a11y-h1`). Link the page from
|
|
27
29
|
the menu.
|
|
28
|
-
5. The
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
5. The template's input is already labelled (`aria-label`, default
|
|
31
|
+
"Search"). To translate the template, add `search_label`, `search_title`
|
|
32
|
+
and `search_placeholder` to the site's translations. A copy published
|
|
33
|
+
before plugin-search 2.3.0 lacks both: refresh it with
|
|
34
|
+
`npx nera-search --force` if it was never edited.
|
|
31
35
|
6. The index is written to `theme/assets/search-index.json` on every build
|
|
32
36
|
and served as `/search-index.json`. It is generated: add
|
|
33
37
|
`theme/assets/search-index*.json` to `.gitignore`.
|