Documenter.jl - how to add package

I’m developing a package called UnitfulAstrodynamics, which is hosted on GitHub. I’m using Documenter.jl for documentation, and I have a docs/ folder at the top level of the package.

The GitHub action julia-actions/julia-docdeploy@latest uses docs/Project.toml to instantiate all the dependencies for makeing the documentation.

The documentation requires UnitfulAstrodynamics, but I’m not sure how to best include all UnitfulAstrodynamics/Project.toml dependencies in UnitfulAstrodynamics/docs/Project.toml.

So far, I’ve used:

cd UnitfulAstrodynamics/docs
julia --project # activates UnitfulAstrodynamics/docs/Project.toml
]add Documenter
]add ..

This seems to track the version of my project that is stored in Github (as defined by UnitfulAstrodynamics/Manifest.toml). That’s often fine, but when I define new types locally, and then try to make and serve the documentation locally for testing, the documentation doesn’t recognize the new types because they’re not yet pushed to GitHub.

Other packages that use Documenter.jl seem to include the top level package in docs/Project.toml. One example is ControlSystems.jl/docs/Project.toml. Are other developers running into the same issue I am? Otherwise, how should I best ]add UnitfulAstrodynamics to UnitfulAstrodynamics/docs/Project.toml?

1 Like

The problem is ]add .. which should be ]dev ..; you want to track the path, not the most recent commit. You will get something like in the manifest.