6

I am using DocFx to generate documentation about a WCF web-service. The target audience for the documentation is clients of the web-service. These clients obviously do not have access to the .NET binaries directly.

Documentation of the public interfaces and models, and their methods and properties, is important, but there is a lot of other information that is irrelevant to clients:

  • Implements
  • Inherited Members
  • Assembly
  • Syntax
  • Constructors

To be clear - I am not wanting to filter out certain types or members (as described here) - I am wanting to filter out entire sections of the documentation of all types.

Laurence
  • 980
  • 12
  • 31

2 Answers2

6

You can customize the output by overwriting the template.

In my case, I erased the assembly section from the class page by following.

  1. export default template by docfx template export default.
  2. copy _exported_templates/default/partials/class.header.tmpl.partial into DOCFX_PROJECT_ROOT/templates/custom/partial.
  3. edit and remove the assembly section from the copied file.
  4. in your build section of docfx.json, edit the template to the following
"template": [
      "default",
      "templates/custom"
    ],

You can now build normally by something like docfx docfx.json.

I believe the other sections you mentioned can be erased by editing and copying the appropriate files in the template directory.

kota
  • 125
  • 9
  • This was really helpful thank you. One minor thing though, I needed to change `DOCFX_PROJECT_ROOT/templates/custom/partial` to `DOCFX_PROJECT_ROOT/templates/custom/partials` (s on the end) – CT14.IT Aug 12 '21 at 13:07
2

How to hide inherited members:

Add

.inheritedMembers { display: none; }

to "_site\styles\main.css"