diff --git a/lib/tasks/search.rake b/lib/tasks/search.rake
index 85613c9f116c20bff6ec8a4a37c3931fd85ffadd..0e83dd1c4dc3adde0ad2a7c06c77f27ad2e5de9f 100644
--- a/lib/tasks/search.rake
+++ b/lib/tasks/search.rake
@@ -1,4 +1,4 @@
-,nit do
+task :init do
   touch search-data.json
 
   File.open('search-data.json', 'w') do |f|
@@ -13,9 +13,6 @@
     "url": "{{ page.url | xml_escape }}"
   }{% if forloop.last %}{% else %},
   {% endif %}{% endfor %}
-}
-
-  end
-end'
-
+}'
   end
+end