Generate navigation html only once for all pages.
This reduces the time for apidoc generation by ~30%.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -92,7 +92,7 @@ var version = obj.packageInfo.version;
|
||||
</div>
|
||||
|
||||
<div id="wrap" class="clearfix">
|
||||
<?js= this.partial('navigation.tmpl', this) ?>
|
||||
<?js= this.navigationHtml ?>
|
||||
<div class="main">
|
||||
<h1 class="page-title" data-filename="<?js= filename ?>"><?js= title ?></h1>
|
||||
<div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
|
||||
|
||||
Reference in New Issue
Block a user