From 902db36edb0b3b1efd08579e677e40f50437f68b Mon Sep 17 00:00:00 2001 From: Joel Marcey Date: Sun, 10 Jun 2018 17:37:43 -0700 Subject: [PATCH] Fix broken search guide formatting --- docs/guides-search.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/guides-search.md b/docs/guides-search.md index df91165e79..3b38b21ba8 100644 --- a/docs/guides-search.md +++ b/docs/guides-search.md @@ -22,22 +22,22 @@ const siteConfig = { ... }; ``` --## Extra Search Options -- --You can also specify extra [search options used by Algolia](https://community.algolia.com/docsearch/documentation/) by using an `algoliaOptions` field in `algolia`. This may be useful if you want to provide different search results for the different versions or languages of your docs. Any occurrences of "VERSION" or "LANGUAGE" will be replaced by the version or language of the current page, respectively. More details about search options can be [found here](https://www.algolia.com/doc/api-reference/api-parameters/#overview). -- --```js --const siteConfig = { -- ... -- algolia: { -- ... -- algoliaOptions: { -- facetFilters: [ 'tags:VERSION' ], -- hitsPerPage: 5 -- } -- }, --}; --`` + +## Extra Search Options + +You can also specify extra [search options used by Algolia](https://community.algolia.com/docsearch/documentation/) by using an `algoliaOptions` field in `algolia`. This may be useful if you want to provide different search results for the different versions or languages of your docs. Any occurrences of "VERSION" or "LANGUAGE" will be replaced by the version or language of the current page, respectively. More details about search options can be [found here](https://www.algolia.com/doc/api-reference/api-parameters/#overview). + +```js +const siteConfig = { + ... + algolia: { + ... + algoliaOptions: { + facetFilters: [ "lang:LANGUAGE", "version:VERSION" ] + } + }, +}; +``` Algolia might provide you with [extra search options](https://community.algolia.com/docsearch/documentation/). If so, you should add them to the `algoliaOptions` object.