diff --git a/_layouts/default.html b/_layouts/default.html
index 5f6e664b431f847bce4234d2471dc4cecf1a4a51..8641d982f825163ac8c2bcf5b8cee666e267c551 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -48,16 +48,18 @@ layout: table_wrappers
       </a>
     </div>
     <nav role="navigation" aria-label="Main" id="site-nav" class="site-nav">
-      {% if site.doc_collections %}
-        {% assign doc_collections_size = site.doc_collections | size %}
-        {% for doc_collection in site.doc_collections %}
-          {% assign collection_name = doc_collection[0] %}
-          {% assign collection = site[collection_name] %}
-          {% assign name = doc_collection[1].name %}
-          {% if doc_collections_size > 1 %}
-            <div class="nav-category">{{ name }}</div>
+      {% if site.just_the_docs.collections %}
+        {% assign collections_size = site.just_the_docs.collections | size %}
+        {% for collection_entry in site.just_the_docs.collections %}
+          {% assign collection_key = collection_entry[0] %}
+          {% assign collection_value = collection_entry[1] %}
+          {% assign collection = site[collection_key] %}
+          {% if collection_value.nav_exclude != true %}
+            {% if doc_collections_size > 1 %}
+              <div class="nav-category">{{ collection_value.name }}</div>
+            {% endif %}
+            {% include nav.html pages=collection %}
           {% endif %}
-          {% include nav.html pages=collection %}
         {% endfor %}
       {% else %}
         {% include nav.html pages=site.html_pages %}
diff --git a/assets/js/zzzz-search-data.json b/assets/js/zzzz-search-data.json
index 05b393d654fbda4446f3edfb185eb5177b1bc1a7..6235244d31dbe00641446e906bdf5d38ded9c9fa 100644
--- a/assets/js/zzzz-search-data.json
+++ b/assets/js/zzzz-search-data.json
@@ -2,14 +2,17 @@
 permalink: /assets/js/search-data.json
 ---
 {
-{% assign i = 0 -%}
+{%- assign i = 0 -%}
 {%- assign pages_array = '' | split: '' -%}
 {%- assign pages_array = pages_array | push: site.html_pages -%}
-{%- if site.doc_collections -%}
-  {%- for doc_collection in site.doc_collections -%}
-    {% assign collection_name = doc_collection[0] %}
-    {% assign collection = site[collection_name] %}
-    {%- assign pages_array = pages_array | push: collection -%}
+{%- if site.just_the_docs.collections -%}
+  {%- for collection_entry in site.just_the_docs.collections -%}
+    {%- assign collection_key = collection_entry[0] -%}
+    {%- assign collection_value = collection_entry[1] -%}
+    {%- assign collection = site[collection_key] -%}
+    {%- if collection_value.search_exclude != true -%}
+      {%- assign pages_array = pages_array | push: collection -%}
+    {%- endif -%}
   {%- endfor -%}
 {%- endif -%}
 {%- for pages in pages_array -%}
diff --git a/lib/tasks/search.rake b/lib/tasks/search.rake
index 5b656821449032b3aede5f59afb26aa2ad25985f..5c0ffe4f1c235e138c6056e16a69e686f2c39b88 100644
--- a/lib/tasks/search.rake
+++ b/lib/tasks/search.rake
@@ -12,14 +12,17 @@ namespace :search do
 permalink: /assets/js/search-data.json
 ---
 {
-{% assign i = 0 -%}
-{%- assign pages_array = \'\' | split: \'\' -%}
+{%- assign i = 0 -%}
+{%- assign pages_array = '' | split: '' -%}
 {%- assign pages_array = pages_array | push: site.html_pages -%}
-{%- if site.doc_collections -%}
-  {%- for doc_collection in site.doc_collections -%}
-    {% assign collection_name = doc_collection[0] %}
-    {% assign collection = site[collection_name] %}
-    {%- assign pages_array = pages_array | push: collection -%}
+{%- if site.just_the_docs.collections -%}
+  {%- for collection_entry in site.just_the_docs.collections -%}
+    {%- assign collection_key = collection_entry[0] -%}
+    {%- assign collection_value = collection_entry[1] -%}
+    {%- assign collection = site[collection_key] -%}
+    {%- if collection_value.search_exclude != true -%}
+      {%- assign pages_array = pages_array | push: collection -%}
+    {%- endif -%}
   {%- endfor -%}
 {%- endif -%}
 {%- for pages in pages_array -%}