# Writing documentation for a project with DrWatson

**URL:** https://discourse.julialang.org/t/writing-documentation-for-a-project-with-drwatson/81554
**Category:** General Usage
**Tags:** question, documentation, documenter, drwatson
**Created:** [May 24, 2022, 7:32am UTC](https://discourse.julialang.org/t/writing-documentation-for-a-project-with-drwatson/81554 "2022-05-24T07:32:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)
#### Post date: [May 24, 2022, 7:32am UTC](https://discourse.julialang.org/t/writing-documentation-for-a-project-with-drwatson/81554/1 "2022-05-24T07:32:09Z")

</div>

I have a [DrWatson](https://docs.juliahub.com/DrWatson/Vn5dT/1.15.1/) project for which I want to write some documentation.  
I was wondering if I can use [Documenter.jl](https://juliadocs.github.io/Documenter.jl/stable/) even though this is a project and not a package.  
Are there any tips for writing documentation for a project?

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [May 24, 2022, 9:05am UTC](https://discourse.julialang.org/t/writing-documentation-for-a-project-with-drwatson/81554/2 "2022-05-24T09:05:32Z")

</div>

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](https://github.com/JuliaDynamics/DynamicalSystems.jl/blob/master/docs/make.jl#L94) and in this file I load some stuff: [DynamicalSystems.jl/index.md at main · JuliaDynamics/DynamicalSystems.jl · GitHub](https://github.com/JuliaDynamics/DynamicalSystems.jl/blob/master/docs/src/index.md?plain=1#L135) . 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).

---

<div class="post-metadata">

### Author: ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)
#### Post date: [May 24, 2022, 9:19am UTC](https://discourse.julialang.org/t/writing-documentation-for-a-project-with-drwatson/81554/3 "2022-05-24T09:19:01Z")

</div>

I did not yet try to use it, so it didn’t fail yet.  
In this [part](https://juliadocs.github.io/Documenter.jl/stable/man/guide/#Building-an-Empty-Document) of the documentation of Documenter.jl they say to add the following to a `make.jl` file

```julia
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.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [May 24, 2022, 9:25am UTC](https://discourse.julialang.org/t/writing-documentation-for-a-project-with-drwatson/81554/4 "2022-05-24T09:25:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)
#### Post date: [May 24, 2022, 9:36am UTC](https://discourse.julialang.org/t/writing-documentation-for-a-project-with-drwatson/81554/5 "2022-05-24T09:36:40Z")

</div>

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

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

using DrWatson
@quickactivate "MyProject"

using Documenter

makedocs(sitename="My Documentation")

```
