# PSA: Use a project for building your docs

**URL:** <https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974>\
**Category:** Tooling\
**Tags:** documentation\
**Created:** [September 14, 2018, 7:09pm UTC](https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974 "2018-09-14T19:09:42Z")\
**Posts on this page:** 5\
**Page:** 2

<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:** [March 17, 2019, 9:03am UTC](https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974/22 "2019-03-17T09:03:13Z")

</div>

You could submit coverage from the doc worker too.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 17, 2019, 9:04am UTC](https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974/23 "2019-03-17T09:04:56Z")

</div>

But wouldn’t I miss `Pkg.test` coverage then? Is there a way to have both?

**EDIT** eg as an example, think of [the test setup of PGFPlotsX](https://github.com/KristofferC/PGFPlotsX.jl/blob/master/test/runtests.jl).

---

<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:** [March 17, 2019, 10:12am UTC](https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974/24 "2019-03-17T10:12:47Z")

</div>

I am not exactly sure how coverage works, but since basically all packages submit a report from each worker I assume the coverage is computed based on all of them, and an additional report from the doc worker should work just fine.

In the case of that example I assume you shouldn’t have to do anything; tests and doc-building are run in the same Travis session so the coverage files should not be removed and one submission should include all of them. The problem is probably just that the coverage flag is not sent to the new process, see [pass --code-coverage to doc build process by fredrikekre · Pull Request #144 · KristofferC/PGFPlotsX.jl · GitHub](https://github.com/KristofferC/PGFPlotsX.jl/pull/144).

---

<div class="post-metadata">

**Author:** ![kapple](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kapple/32/218915_2.png) [@kapple](https://discourse.julialang.org/u/kapple)\
**Post date:** [September 28, 2020, 3:38am UTC](https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974/25 "2020-09-28T03:38:15Z")

</div>

I have a follow up clarification question, because as @Tamas_Papp expected, my doc building process is failing whenever I have

````julia
    ```@example
    using MyPackage
    ...
    ```

````

in my markdown documentation with Documenter.jl. It says `Package MyPackage not found in current path.`

So the three lines

> [@fredrikekre](#):
>
> ```julia
> export JULIA_LOAD_PATH=docs/:.:
> julia -e 'using Pkg; Pkg.instantiate()'
> julia docs/make.jl
> 
> ```

should be added to what file exactly? Does the `export` line get placed in my module, and the last two lines get run in the command line?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [September 28, 2020, 7:12am UTC](https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974/26 "2020-09-28T07:12:33Z")

</div>

Quite a bit changed since that comment. For current best practices, I recommend following what

[https://github.com/JuliaDocs/Documenter.jl](https://github.com/JuliaDocs/Documenter.jl)

does.

[Previous page](https://discourse.julialang.org/t/psa-use-a-project-for-building-your-docs/14974.md?page=1)
