joinijo
joinijo

Reputation: 473

Add function docstrings with Documenter.jl

I'm trying to create a documentation for a Julia package using Documenter.jl. (I'm fairly new to Julia in general though.) Now I was wondering how I can get all functions with a docstring appear in the documentation? I know I can add a function f via

## Functions

```@docs
f
```

in the markdown file but that would mean I have to add all functions manually. Isn't there a way of adding all functions automatically?

Upvotes: 3

Views: 461

Answers (1)

joinijo
joinijo

Reputation: 473

Ok for anyone interested I just found out how to do it:

```@autodocs
Modules = [Foo, Bar]
Order   = [:function, :type]
```

as shown in https://juliadocs.github.io/Documenter.jl/stable/man/syntax/#@docs-block.

Upvotes: 3

Related Questions