Documenter.jl
Documenter.jl copied to clipboard
Add support for 'Filter' in `@index`
A great feature of @autodocs
is Filter
. So, I can do for example:
```@autodocs
Modules = [CellArrays]
Order = [:type]
Filter = t -> typeof(t) !== CellArray
It seems to me natural to list first what @autodocs
will show. Thus, in analogy, I would be tempted to do the selection for @index
just the same way as for @autodocs
:
```@index
Modules = [CellArrays]
Order = [:type]
Filter = t -> typeof(t) !== CellArray
However, to my surprise Filter
is not supported for @index
. Is there any particular reason for this or could this be added?
I presume it's because the index would usually apply to the whole page or manual. However, I don't see any harm in allowing optional custom filtering here.
Thanks a lot @mortenpi !
The idea is to enable this kind of documentation pattern where content is presented in whichever custom categories are appropriate (not covered by Modules
and Order
):
EDIT: in this example CellArrays.CellArray
should not be listed in the index, but be filtered out using Filter
...