# Documenter.jl - Docs empty unless manually created? Old references to moved functions?

**URL:** <https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304>\
**Category:** General Usage\
**Created:** [September 30, 2019, 12:16am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304 "2019-09-30T00:16:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [September 30, 2019, 12:16am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/1 "2019-09-30T00:16:45Z")

</div>

When I build my docs, references to an older version of my package documentation persists? Functions that were documented and refactored to other files are being displayed. Despite the old docs being deleted each time I try, and them not being added to my git. For example: [https://caseykneale.github.io/ChemometricsTools.jl/man/Analysis/](https://caseykneale.github.io/ChemometricsTools.jl/man/Analysis/)  
The function Q is no longer in this file? Why is it being generated?

While many of my docs pages are blank?  
[https://caseykneale.github.io/ChemometricsTools.jl/man/classMetrics/](https://caseykneale.github.io/ChemometricsTools.jl/man/classMetrics/)

~~Whatever is going on it is killing my CI/CD? IE:  
 ~~

> **[Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/caseykneale/ChemometricsTools.jl)**
>
> Travis CI enables your team to test and ship your apps with confidence. Easily sync your projects with Travis CI and you'll be testing your code in minutes.

~~CICD failed saying “Documenter” not present, so I added it to the package (again?). Being met with the same error?~~

edit - update I was able to fix the CICD issue I think? Latest Travis: [Travis CI - Test and Deploy with Confidence](https://travis-ci.org/caseykneale/ChemometricsTools.jl/jobs/591267595)

I am really bad at this DevOps stuff. Any help would be really appreciated.

The last time I ran my docs build script everything was fine?

---

<div class="post-metadata">

**Author:** ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)\
**Post date:** [September 30, 2019, 5:18am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/2 "2019-09-30T05:18:01Z")

</div>

You don’t seem to have deployment configured for the documentation – `docs/make.jl` is missing the call to `deploydocs`. See the [Hosting Documentation](https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#The-deploydocs-Function-1) page on how to set all that up.

You have also committed the generated `.html` files onto the `master` branch. They should be committed to `gh-pages` (which `deploydocs` does automatically if set up correctly). You also need to [change the GitHub repository settings probably](https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages#enabling-github-pages-to-publish-your-site-from-master-or-gh-pages), to make sure it publishes the GitHub pages page from the `gh-pages` branch and not from the `docs/` directory.

Finally, I would recommend that you remove the [environment manipulation stuff](https://github.com/caseykneale/ChemometricsTools.jl/blob/ed9633339617e0c7d67776bcc6487d982dc6db86/docs/make.jl#L1-L5) from `docs/make.jl`. The correct environment should be activate by starting Julia with `julia --project=docs/` (which needs to be [changed too](https://github.com/caseykneale/ChemometricsTools.jl/blob/ed9633339617e0c7d67776bcc6487d982dc6db86/.travis.yml#L25-L26)).

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [September 30, 2019, 11:28am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/3 "2019-09-30T11:28:18Z")

</div>

Thank you! It appears a lot has changed since I last configured this.

So far I’ve done the following to address these suggestions:

1. I set up a gh-pages
2. Added deploy docs line
3. Removed environment stuff from make.jl
4. Updated the travis.yml to mirror the one in the docs. Ie:

```julia
        - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
                                               Pkg.instantiate()'
        - julia --project=docs/ docs/make.jl
      after_success: skip

```

but now I’m getting an error:([Travis CI - Test and Deploy Your Code with Confidence](https://travis-ci.org/caseykneale/ChemometricsTools.jl/jobs/591445782))

```julia
julia --project=docs/ docs/make.jl

ERROR: LoadError: ArgumentError: Package Documenter not found in current path:

- Run `import Pkg; Pkg.add("Documenter")` to install the Documenter package.

```

Without those environment things in my make.jl Travis can’t find Documenter? Any advice.

---

<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:** [September 30, 2019, 11:37am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/4 "2019-09-30T11:37:40Z")

</div>

You don’t have a `docs/Project.toml` file with e.g. `Documenter`.  
Edit: [https://github.com/caseykneale/ChemometricsTools.jl/pull/14](https://github.com/caseykneale/ChemometricsTools.jl/pull/14)

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [September 30, 2019, 9:30pm UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/5 "2019-09-30T21:30:15Z")

</div>

Thanks Fred!

But now my docs page is completely empty when I check it?

Travis is now passing but not deploying because of “DOCUMENTER\_KEY”?

```julia
┌ Info: Deployment criteria:
│ - ✔ ENV["TRAVIS_REPO_SLUG"]="caseykneale/ChemometricsTools.jl" occurs in repo="github.com/caseykneale/ChemometricsTools.jl.git"
│ - ✔ ENV["TRAVIS_PULL_REQUEST"]="false" is "false"
│ - ✔ ENV["TRAVIS_TAG"]="" is (i) empty or (ii) a valid VersionNumber
│ - ✔ ENV["TRAVIS_BRANCH"]="master" matches devbranch="master" (if tag is empty)
│ - ✘ ENV["DOCUMENTER_KEY"] exists
│ - ✔ ENV["TRAVIS_EVENT_TYPE"]="push" is not "cron"
└ Deploying: ✘

```

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [September 30, 2019, 10:49pm UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/6 "2019-09-30T22:49:21Z")

</div>

Sounds like you’re almost there! Deploy keys are documented here: [Hosting Documentation · Documenter.jl](https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#SSH-Deploy-Keys-1)

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [October 1, 2019, 12:18am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/7 "2019-10-01T00:18:14Z")

</div>

Whew Okay!

I did all of that. Somehow someone named zeptodoctor 😃 posted my pages(I think), here: [https://github.com/caseykneale/ChemometricsTools.jl/tree/gh-pages](https://github.com/caseykneale/ChemometricsTools.jl/tree/gh-pages)

Unfortunately some of the same errors in my documentation persist. Namely some files do not get documented? Other’s do?  
[https://caseykneale.github.io/ChemometricsTools.jl/dev/](https://caseykneale.github.io/ChemometricsTools.jl/dev/)  
Doesn’t: [Regression Models · ChemometricsTools](https://caseykneale.github.io/ChemometricsTools.jl/dev/man/RegressionModels/)  
Does: [Ensemble Models · ChemometricsTools](https://caseykneale.github.io/ChemometricsTools.jl/dev/man/Ensemble/)

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [October 1, 2019, 1:54am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/9 "2019-10-01T01:54:25Z")

</div>

I was able to fix a lot of my docs by removing my code to generate a page for the entire API.

Now I’m just chasing down why this page isn’t displaying?  
[https://caseykneale.github.io/ChemometricsTools.jl/dev/man/modelanalysis/](https://caseykneale.github.io/ChemometricsTools.jl/dev/man/modelanalysis/)

I think I’ll close this thread because this is “good enough” for me for right now.

I’d like to explicitly thank @mortenpi @fredrikekre@ericphanson for helping me through this.

---

<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:** [October 1, 2019, 5:47am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/10 "2019-10-01T05:47:30Z")

</div>

As I [suggested previously](https://discourse.julialang.org/t/how-can-we-encourage-julia-package-developers-to-release-version-1-0-0/29124/18), using one of the package template generators to set up these things would spare you from most of the problems encountered in this topic.

I am not sure why you are doing this the hard way.

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [October 1, 2019, 10:06am UTC](https://discourse.julialang.org/t/documenter-jl-docs-empty-unless-manually-created-old-references-to-moved-functions/29304/11 "2019-10-01T10:06:29Z")

</div>

Thanks for the suggestion Tamas, This was how I set it up in the past before the package template generator was ready/stable. It’s what I am comfortable with.

Also the problem - I think - was that I had a docs/src file that generated doc for my entire module as well as page-wise docs. So this made a lot of duplicate documentation. Not sure why but doing this lead to really unreliable results.
