jsdoc2md / dmd

The default output template for jsdoc2md
MIT License
38 stars 49 forks source link

Is there a way to suppress a specific tag without editing the partial? #40

Closed Redsandro closed 7 years ago

Redsandro commented 7 years ago

Say I want to slim down documentation and remove e.g. author and copyright because they are 500 times the same. Can I specify somewhere to ignore them, rather than copy and edit the partials?

Using jsdoc-to-markdown.

75lb commented 7 years ago

Well, one way is to tweak the partial:

  1. Duplicate this partial into your project (important - it must have the same filename body.hbs).
  2. Remove the {{>authors~}} and {{>copyright~}} lines
  3. run jsdoc2md --partial tweaks/body.hbs

The other way is to run .getTemplateData() to get the template data, manually strip out the unwanted fields, then pass the data (as options.data) into .render().

Redsandro commented 7 years ago

Thank you! :+1: