Writing documentation for a project with DrWatson

I have a DrWatson project for which I want to write some documentation.
I was wondering if I can use Documenter.jl even though this is a project and not a package.
Are there any tips for writing documentation for a project?

Hm, I’m surprised by this, because I didn’t know Documenter.jl was only for packages… Where did the process fail for you? Can you try it out and report the error message or what didn’t work? I would expect things to work as usual.

Ah, I guess you’d have to put your source code into a module, or explicitly load the source files in the first example code block Documenter would come across. E.g., here I force Documenter to expand first this file: DynamicalSystems.jl/make.jl at main · JuliaDynamics/DynamicalSystems.jl · GitHub and in this file I load some stuff: DynamicalSystems.jl/index.md at main · JuliaDynamics/DynamicalSystems.jl · GitHub . In your case this would include source code. (If you’ve made your DrWatson project into a module none of this is necessary; simply load the module).

1 Like

I did not yet try to use it, so it didn’t fail yet.
In this part of the documentation of Documenter.jl they say to add the following to a make.jl file

using Documenter, Example

makedocs(sitename="My Documentation")

where Example here is the name of the package.
But since this is a project, I cannot do using Example. I did not try it yet, because I did not want to break anything in my package.

Documenter is not just for packages. If you don’t have a package Example, just don’t do using Example.

1 Like

True that!
I just had to load DrWatson and activate the project like so:

push!(LOAD_PATH,"../src/")

using DrWatson
@quickactivate "MyProject"

using Documenter

makedocs(sitename="My Documentation")