Browse Source

Updates to modern tipue search

Caleb Fangmeier 6 years ago
parent
commit
7f38d9ae85
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tipue_search/tipue_search.py

+ 3 - 1
tipue_search/tipue_search.py

@@ -82,7 +82,7 @@ class Tipue_Search_JSON_Generator(object):
 
 
     def generate_output(self, writer):
-        path = os.path.join(self.output_path, 'tipuesearch_content.json')
+        path = os.path.join(self.output_path, 'tipuesearch_content.js')
 
         pages = self.context['pages'] + self.context['articles']
 
@@ -97,7 +97,9 @@ class Tipue_Search_JSON_Generator(object):
         root_node = {'pages': self.json_nodes}
 
         with open(path, 'w', encoding='utf-8') as fd:
+            fd.write('var tipuesearch = ')
             json.dump(root_node, fd, separators=(',', ':'), ensure_ascii=False)
+            fd.write(';')
 
 
 def get_generators(generators):