Skip to content

Commit d54938c

Browse files
committed
docs: add troubleshooting section for missing source links (#834)
1 parent 3b85898 commit d54938c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/src/man/guide.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,3 +464,26 @@ There's a `sidebar_sitename` keyword option for
464464
[`Documenter.HTML`](@ref) that lets you hide the sitename
465465
that's usually displayed below a logo. This is useful if the
466466
logo already contains the name.
467+
468+
## Troubleshooting
469+
470+
### Missing `[source]` links
471+
If the `[source]` links next to your docstrings are missing in the deployed
472+
documentation, it is likely because the package was not installed in
473+
"development mode" during the build process.
474+
475+
When Documenter runs, it needs access to the local `.git` directory to determine
476+
the commit hash and remote URL. If a package is installed via `Pkg.add`, it is
477+
placed in a read-only cache without the `.git` metadata.
478+
479+
**The Fix:**
480+
Ensure your Continuous Integration (CI) script or `docs/make.jl` file uses
481+
`Pkg.develop` instead of `Pkg.add`.
482+
483+
```@example
484+
# This block is for illustration and is not executed during tests.
485+
# In a real setup, MyPackage would be your actual package name.
486+
using Pkg
487+
Pkg.activate("..")
488+
# Pkg.develop(PackageSpec(path=pwd()))
489+
# using MyPackage

0 commit comments

Comments
 (0)