diff --git a/_config.yml b/_config.yml index 2afe7c0e..4bfe5574 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 02e540ad..144c38cb 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 00000000..21ac5fbc --- /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 3058f6b1..329c30d1 100644 --- a/_includes/search/search_form.html +++ b/_includes/search/search_form.html @@ -4,6 +4,13 @@ {%- when "lunr" -%}
+ {%- when "google" -%} +
+ +
+
+ +
{%- when "algolia" -%}
diff --git a/_layouts/search.html b/_layouts/search.html index 7b88df7c..50229789 100644 --- a/_layouts/search.html +++ b/_layouts/search.html @@ -27,6 +27,13 @@ layout: default {%- when "lunr" -%}
+ {%- when "google" -%} +
+ +
+
+ +
{%- when "algolia" -%}