clenemt / docdash

:zap: Lodash inspired JSDoc 3 template/theme
http://clenemt.github.io/docdash/
Other
824 stars 201 forks source link

Option to remove (static) from documention #84

Closed z3dev closed 2 years ago

z3dev commented 4 years ago

First, thanks for this very nice template. Love it.

However, we have a small issue with the documentation. In general, our 'api' is assembled from smaller functions using an index, that also exports the functions as part of the API.

/**
 * @module modeling/expansions
 */
module.exports = {
  expand: require('./expand'),
  offset: require('./offset')
}

The documentation produced always has the 'static' keyword in front of the documentation.

(static) offset(options, …geometry) → {Object|Array}

In our case, it would be nice to disable the 'static' keyword from appearing in the documentation.

ar2rsawseen commented 4 years ago

Hmm, I am sorry, but I don't think we can do that. If JSDoc parser recognizes them as static ones, don't think it would be a good idea to change that logic. But I guess you can inject CSS or even JS to hide those specific portions yourself when displaying docs?

z3dev commented 4 years ago

But I guess you can inject CSS or even JS to hide those specific portions yourself when displaying docs?

Could do if the section is identified... I’ll check.

z3dev commented 4 years ago

If JSDoc parser recognizes them as static ones, don't think it would be a good idea to change that logic.

I’m not sure the logic of JSDOC matters, as there are other options that ‘hide’ sections, etc.

z3dev commented 4 years ago

But I guess you can inject CSS or even JS to hide those specific portions yourself when displaying docs?

Could do if the section is identified... I’ll check.

Nope. No can do. The class 'type-signiture' is being used in other parts of the document. Hiding this class will hide other parts as well.

If there was a small change to make this span unique then a CSS change could happen.

ar2rsawseen commented 4 years ago

Sure, not CSS, but javascript? I think it should be possible. To select all needed elements by class and iterate through them to check contents (with jquery would have been even easier :) )

But overall, this seems to be such specific customization, I really don't see a place for it much. But I would accept a PR for adding a specific CSS class or data attribute to those tags.

z3dev commented 4 years ago

No time, sorry. Just add this to the TODO list for the next version. There's no hurry.

ar2rsawseen commented 2 years ago

Added here https://github.com/clenemt/docdash/commit/4f1a3566aa6738a153a70571d607861e47b46cde