You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The API page output format is a great way to help organize large project reference documentation by grouping types into categories, e.g. Classes and Enums. However, in some domains it would be great to have support for additional custom groups, e.g. Attributes or TypeConverters.
Describe the solution you'd like
It would be great if there was a way to specify new custom categories, and provide filters for types to be included in them, e.g. similar to hasAttribute in filter.yml.
For example, in the YAML below we would be able to specify that all classes with the AttributeUsageAttribute would be grouped under a new custom API page type group called Attributes.
I have looked into the DocFX template system for ways to customize the left-hand side TOC and couldn't find anything that could be used to achieve this.
It is unclear from the current docs and template code how the grouping in the API page templates is even achieved in the current DocFX template system, but it could be another way to do it, as long as there are ways to specify the relevant conditionals.
Additional context
It looks like the current feature for API page output format might be implemented here:
Apparently the t in this lambda is an instance of INamedTypeSymbol from the Roslyn analyzers. If this is the case, it should be possible to add additional predicates to test custom attributes using the ISymbol.GetAttributes method, e.g. something like:
I have looked into the DocFX template system for ways to customize the left-hand side TOC and couldn't find anything that could be used to achieve this.
Is your feature request related to a problem? Please describe.
The API page output format is a great way to help organize large project reference documentation by grouping types into categories, e.g.
Classes
andEnums
. However, in some domains it would be great to have support for additional custom groups, e.g.Attributes
orTypeConverters
.Describe the solution you'd like
It would be great if there was a way to specify new custom categories, and provide filters for types to be included in them, e.g. similar to
hasAttribute
infilter.yml
.For example, in the YAML below we would be able to specify that all classes with the
AttributeUsageAttribute
would be grouped under a new custom API page type group calledAttributes
.Describe alternatives you've considered
I have looked into the DocFX template system for ways to customize the left-hand side TOC and couldn't find anything that could be used to achieve this.
It is unclear from the current docs and template code how the grouping in the API page templates is even achieved in the current DocFX template system, but it could be another way to do it, as long as there are ways to specify the relevant conditionals.
Additional context
It looks like the current feature for API page output format might be implemented here:
docfx/src/Docfx.Dotnet/DotnetApiCatalog.ApiPage.cs
Lines 181 to 185 in 7734a89
Apparently the
t
in this lambda is an instance ofINamedTypeSymbol
from the Roslyn analyzers. If this is the case, it should be possible to add additional predicates to test custom attributes using theISymbol.GetAttributes
method, e.g. something like:The text was updated successfully, but these errors were encountered: