From 95f20cb4efae46256c35a4c355e7f50846d19e5b Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Wed, 2 May 2018 15:31:26 +0000 Subject: [PATCH] Deploy website Deploy website version based on 37ba857490774a006106bfb4513c882acd6c4aeb --- docs/en/next/search.html | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/docs/en/next/search.html b/docs/en/next/search.html index 568427f967..86bc5fa9fd 100644 --- a/docs/en/next/search.html +++ b/docs/en/next/search.html @@ -1,4 +1,4 @@ -Enabling Search · Docusaurus
Edit

Enabling Search

Docusaurus supports search using Algolia DocSearch. Once you have set up your site, enter your site information to have Algolia crawl your website's documentation pages. Algolia will then send you an API key and index name for your site.

+
Edit

Enabling Search

Docusaurus supports search using Algolia DocSearch. Once your website is online, you can submit it to DocSearch. Algolia will then send you credentials you can add to your siteConfig.js.

+

DocSearch works by crawling the content of your website every 24 hours and putting all the content in an Algolia index. This content is then queried directly from your front-end using the Algolia API. Note that your website need to be publicly available for this to work (ie. not behind a firewall). This service is free.

Enabling the Search Bar

-

Enter your search-only API key and index name into siteConfig.js in the algolia section to enable search for your site.

+

Enter your API key and index name (sent by Algolia) into siteConfig.js in the algolia section to enable search for your site.

const siteConfig = {
   ...
   algolia: {
-    apiKey: 'my-search-only-api-key-1234',
-    indexName: 'my-index-name'
+    apiKey: 'my-api-key',
+    indexName: 'my-index-name',
+    algoliaOptions: {} // Optional, if provided by Algolia
   },
   ...
 };
 
-

Extra Search Options

-

You can also specify extra search options used by Algolia 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.

-
const siteConfig = {
-  ...
-  algolia: {
-    ...
-    algoliaOptions: {
-      facetFilters: [ 'tags:VERSION' ],
-      hitsPerPage: 5
-    }
-  },
-};
-
+

Algolia might provide you with extra search options. If so, you should add them to the algoliaOptions object.

Controlling the Location of the Search Bar

By default, the search bar will be the rightmost element in the top navigation bar.

-

If you want to change the default location, add the searchBar flag in the headerLinks field of siteConfig.js in your desired location. For example, you may want the search bar in between your internal and external links.

+

If you want to change the default location, add the searchBar flag in the headerLinks field of siteConfig.js in your desired location. For example, you may want the search bar between your internal and external links.

const siteConfig = {
   ...
   headerLinks: [
@@ -55,7 +45,7 @@
 

Disabling the Search Bar

To disable the search bar, comment out (recommended) or delete the algolia section in the siteConfig.js file.

Also, if you have customized the location of the search bar in headerLinks, set search: false.

-