Generate navigation html only once for all pages.

This reduces the time for apidoc generation by ~30%.
This commit is contained in:
Maximilian Krög
2020-02-03 23:37:44 +01:00
parent 35569a8427
commit 0c04293d5f
2 changed files with 2 additions and 1 deletions

View File

@@ -477,6 +477,7 @@ exports.publish = function(taffyData, opts, tutorials) {
// index page displays information from package.json and lists files
const files = find({kind: 'file'});
view.navigationHtml = helper.resolveLinks(view.partial('navigation.tmpl'));
generate('Index',
[{kind: 'mainpage', readme: opts.readme, longname: (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'}].concat(files),
indexUrl);