Add docs for custom search placeholder (#939)

Follow-up to #613. Relatively self-explanatory!

Co-authored-by: Peter Mosses <18308236+pdmosses@users.noreply.github.com>
This commit is contained in:
Matt Wang 2022-09-07 10:04:25 -07:00 committed by GitHub
parent e03483d8ed
commit 91a894c0d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,3 +166,29 @@ Content added to this file appears at the top of every page's main content betwe
`_includes/nav_footer_custom.html`
Any content added to this file will appear at the bottom left of the page below the site's navigation. By default an attribution to Just the Docs is displayed which reads, `This site uses Just the Docs, a documentation theme for Jekyll.`.
### Custom Search Placeholder
`_includes/search_placeholder_custom.html`
Content added to this file will replace the default placeholder text in the search bar (and its `aria-label`), after stripping HTML and leading/trailing whitespace. By default, the content of the include is:
{% raw %}
```liquid
Search {{site.title}}
```
{% endraw %}
Override this file to render a custom placeholder. One common use-case is internationalization; for example,
{% raw %}
```liquid
Chercher notre site
```
{% endraw %}
would make the placeholder text "Chercher notre site". [Liquid code](https://jekyllrb.com/docs/liquid/) (including [Jekyll variables](https://jekyllrb.com/docs/variables/)) is also supported.