summaryrefslogtreecommitdiffstats
path: root/lib/generate/site/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/generate/site/index.js')
-rw-r--r--lib/generate/site/index.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/generate/site/index.js b/lib/generate/site/index.js
index 588ffdb..af8711b 100644
--- a/lib/generate/site/index.js
+++ b/lib/generate/site/index.js
@@ -223,11 +223,22 @@ Generator.prototype.writeSearchIndex = function() {
);
};
+// Dump glossary index to disk
+Generator.prototype.writeGlossaryIndex = function() {
+ if (!this.glossaryIndexer) return Q();
+
+ return fs.writeFile(
+ path.join(this.options.output, 'glossary_index.json'),
+ this.glossaryIndexer.dump()
+ );
+};
+
Generator.prototype.finish = function() {
return this.copyAssets()
.then(this.copyCover)
.then(this.writeGlossary)
+ .then(this.writeGlossaryIndex)
.then(this.writeSearchIndex);
};