Skip to content

Commit

Permalink
Add exclude_inherited back
Browse files Browse the repository at this point in the history
  • Loading branch information
GMartigny committed Sep 24, 2023
1 parent eca0f8d commit 9fc9048
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ exports.publish = async function (taffyData, opts, tutorials) {
view.navbar = buildNavbar(themeOpts);
view.resizeable = resizeable(themeOpts);
view.codepen = codepen(themeOpts);
view.excludeInherited = Boolean(themeOpts.exclude_inherited);
view.baseURL = getBaseURL(themeOpts);
attachModuleSymbols(
find({ longname: { left: 'module:' } }),
Expand Down
14 changes: 7 additions & 7 deletions tmpl/container.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<?js } ?>

<?js
var classes = self.find({kind: 'class', memberof: doc.longname});
var classes = self.find({kind: 'class', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
if (!isGlobalPage && classes && classes.length) {
?>
<h2 id="classes" class="subsection-title has-anchor">Classes</h2>
Expand All @@ -115,7 +115,7 @@
<?js } ?>

<?js
var mixins = self.find({kind: 'mixin', memberof: doc.longname});
var mixins = self.find({kind: 'mixin', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
if (!isGlobalPage && mixins && mixins.length) {
?>
<h2 id="mixins" class="subsection-title has-anchor">Mixins</h2>
Expand All @@ -127,7 +127,7 @@
<?js } ?>

<?js
var namespaces = self.find({kind: 'namespace', memberof: doc.longname});
var namespaces = self.find({kind: 'namespace', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
if (!isGlobalPage && namespaces && namespaces.length) {
?>
<h2 id="namespaces" class="subsection-title has-anchor">Namespaces</h2>
Expand All @@ -139,7 +139,7 @@
<?js } ?>

<?js
var members = self.find({kind: 'member', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
var members = self.find({kind: 'member', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});

// symbols that are assigned to module.exports are not globals, even though they're not a memberof anything
if (isGlobalPage && members && members.length && members.forEach) {
Expand All @@ -157,7 +157,7 @@
<?js } ?>

<?js
var methods = self.find({kind: 'function', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
var methods = self.find({kind: 'function', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});
if (methods && methods.length && methods.forEach) {
?>
<h2 id="methods" class="subsection-title has-anchor">Methods</h2>
Expand All @@ -168,7 +168,7 @@
<?js } ?>

<?js
var typedefs = self.find({kind: 'typedef', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
var typedefs = self.find({kind: 'typedef', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});
if (typedefs && typedefs.length && typedefs.forEach) {
?>
<h2 id="type-definitions" class="subsection-title has-anchor">Type Definitions</h2>
Expand All @@ -188,7 +188,7 @@
<?js } ?>

<?js
var events = self.find({kind: 'event', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
var events = self.find({kind: 'event', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});
if (events && events.length && events.forEach) {
?>
<h2 id="events" class="subsection-title has-anchor">Events</h2>
Expand Down

0 comments on commit 9fc9048

Please sign in to comment.