From b671d89069447c31c11096e28104baa0c8685741 Mon Sep 17 00:00:00 2001 From: Guillaume Martigny Date: Thu, 10 Feb 2022 03:20:31 +0100 Subject: [PATCH] Add exclude_inherited option --- README.md | 13 +++++++++++++ publish.js | 1 + tmpl/container.tmpl | 14 +++++++------- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f68a625b..1dcd1b9b 100644 --- a/README.md +++ b/README.md @@ -397,6 +397,16 @@ To include js files. Example: It will include the js files to the output dir and also attach a script tag to the html pointing to the included js file. +### `exclude_inherited: ` + +To exclude inherited symbols. Example: + +```json +"exclude_inherited": true +``` + +This will remove all symbols (members, methods ...) that come from inherited parents. + ### Example `theme_opts` ```json @@ -454,6 +464,8 @@ It will include the js files to the output dir and also attach a script tag to t "include_css": ["./static/index.css", "./src/docs/index.css"], "include_js": ["./static/main.js", "./third-party/test/index.js"], + "exclude_inherited": true, + "overlay_scrollbar": { "options": { } @@ -494,6 +506,7 @@ It will include the js files to the output dir and also attach a script tag to t | `static_dir` | `null` | To include static dir | Array of string | | `include_css` | `null` | To include css files | Array of string | | `include_js` | `null` | To include js files | `string` | +| `exclude_inherited` | `false` | To exclude inherited symbols | `boolean` | | `overlay_scrollbar` | `null` | To use overlay scrollbar | Overlay Scrollbar options | | `sections` | `["Menu", "Modules", "Classes", "Externals", "Events", "Namespaces", "Mixins", "Tutorials", "Interfaces", "Global"]` | To order navbar/sidebar sections or to hide/remove navbar/sidebar sections | `Array` | diff --git a/publish.js b/publish.js index 612facdf..8194590e 100644 --- a/publish.js +++ b/publish.js @@ -1051,6 +1051,7 @@ exports.publish = function(taffyData, opts, tutorials) { view.search = search(); view.resizeable = resizeable(); view.codepen = codepen(); + view.excludeInherited = Boolean(themeOpts.exclude_inherited); attachModuleSymbols( find({ longname: { left: 'module:' } }), members.modules diff --git a/tmpl/container.tmpl b/tmpl/container.tmpl index 4715efdc..2f3ce652 100644 --- a/tmpl/container.tmpl +++ b/tmpl/container.tmpl @@ -87,7 +87,7 @@

Classes

@@ -99,7 +99,7 @@

Mixins

@@ -111,7 +111,7 @@

Namespaces

@@ -123,7 +123,7 @@

Methods

@@ -152,7 +152,7 @@

Type Definitions

@@ -172,7 +172,7 @@

Events