Skip to content

Commit

Permalink
Add support for customizing the search input partial
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed May 31, 2023
1 parent 00b97f4 commit a0df1b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layouts/partials/search-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@
data-offline-search-max-results="{{ .Site.Params.offlineSearchMaxResults | default 10 }}"
>
</div>
{{ else if templates.Exists "partials/search-input-custom.html" -}}
{{ partialCached "search-input-custom" . }}
{{ end -}}
1 change: 1 addition & 0 deletions userguide/content/en/docs/adding-content/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ Docsy offers multiple options that let your readers search your site content, so
* [Google Custom Search Engine](#configure-search-with-a-google-custom-search-engine) (GCSE), the default option, which uses Google's index of your public site to generate a search results page.
* [Algolia DocSearch](#configure-algolia-docsearch), which uses Algolia's indexing and search mechanism, and provides an organized dropdown of search results when your readers use the search box. Algolia DocSearch is free for public documentation sites.
* [Local search with Lunr](#configure-local-search-with-lunr), which uses Javascript to index and search your site without the need to connect to external services. This option doesn't require your site to be public.
* Custom search, which used to customize search input by creating the `layouts/partials/search-input-custom.html`, you'll need to disable other search options.

If you enable any of these search options in your project [configuration file], a search box displays in the right of your top navigation bar. By default a search box also displays at the top of the section menu in the left navigation pane, which you can disable if you prefer, or if you're using a search option that only works with the top search box.

Expand Down

0 comments on commit a0df1b8

Please sign in to comment.