diff --git a/assets/js/search-data.json b/assets/js/search-data.json
index 49cbc9dcbc2eeea44a9d48c8f0cbf3a14def27a9..3d57eb3d69d0d5e45783ec0f2d49af38a2b5b877 100644
--- a/assets/js/search-data.json
+++ b/assets/js/search-data.json
@@ -1,12 +1,14 @@
 ---
 ---
 {
-  {% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
-    "id": "{{ forloop.index0 }}",
-    "title": "{{ page.title | replace: '&', '&' }}",
-    "content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```'  | remove: '---' | replace: '\', ' ' | normalize_whitespace }}",
-    "url": "{{ page.url | absolute_url }}",
-    "relUrl": "{{ page.url }}"
-  }{% unless forloop.last %},{% endunless %}
-  {% endif %}{% endfor %}
+  {% assign comma = false %}
+    {% for page in site.html_pages %}{% if page.search_exclude != true %}{% if comma == true%},{% endif %}
+    "{{ forloop.index0 }}": {
+      "id": "{{ forloop.index0 }}",
+      "title": "{{ page.title | replace: '&', '&' }}",
+      "content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```'  | remove: '---' | replace: '\', ' ' | normalize_whitespace }}",
+      "url": "{{ page.url | absolute_url }}",
+      "relUrl": "{{ page.url }}"
+    }{% assign comma = true %}
+    {% endif %}{% endfor %}
 }