diff --git a/_config.yml b/_config.yml index 2afe7c0e296b..4bfe5574e0c5 100644 --- a/_config.yml +++ b/_config.yml @@ -60,13 +60,15 @@ atom_feed: path : # blank (default) uses feed.xml search : # true, false (default) search_full_content : # true, false (default) -search_provider : # lunr (default), algolia +search_provider : # lunr (default), algolia, google algolia: application_id : # YOUR_APPLICATION_ID index_name : # YOUR_INDEX_NAME search_only_api_key : # YOUR_SEARCH_ONLY_API_KEY powered_by : # true (default), false - +google: + search_engine_id : # YOUR_SEARCH_ENGINE_ID + instant_search : # false (default), true # SEO Related google_site_verification : bing_site_verification : diff --git a/_includes/scripts.html b/_includes/scripts.html index 02e540ad27d2..144c38cb854e 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -17,10 +17,12 @@ {%- case search_provider -%} {%- when "lunr" -%} {% include search/lunr-search-scripts.html %} + {%- when "google" -%} + {% include search/google-search-scripts.html %} {%- when "algolia" -%} {% include search/algolia-search-scripts.html %} {%- endcase -%} {% endif %} {% include analytics.html %} -{% include /comments-providers/scripts.html %} +{% include /comments-providers/scripts.html %} \ No newline at end of file diff --git a/_includes/search/google-search-scripts.html b/_includes/search/google-search-scripts.html new file mode 100644 index 000000000000..21ac5fbc9bb0 --- /dev/null +++ b/_includes/search/google-search-scripts.html @@ -0,0 +1,31 @@ + diff --git a/_includes/search/search_form.html b/_includes/search/search_form.html index 3058f6b14c7e..329c30d1024f 100644 --- a/_includes/search/search_form.html +++ b/_includes/search/search_form.html @@ -4,6 +4,13 @@ {%- when "lunr" -%}
+ {%- when "google" -%} + +