# Link back to main repo on each page in Documenter.jl

**URL:** <https://discourse.julialang.org/t/link-back-to-main-repo-on-each-page-in-documenter-jl/57444>\
**Category:** General Usage\
**Tags:** documentation, documenter, github\
**Created:** [March 18, 2021, 6:21am UTC](https://discourse.julialang.org/t/link-back-to-main-repo-on-each-page-in-documenter-jl/57444 "2021-03-18T06:21:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sloede](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sloede/32/44787_2.png) [@sloede](https://discourse.julialang.org/u/sloede)\
**Post date:** [March 18, 2021, 6:21am UTC](https://discourse.julialang.org/t/link-back-to-main-repo-on-each-page-in-documenter-jl/57444/1 "2021-03-18T06:21:04Z")

</div>

I am sure this has been asked before, but I was not able to find it here or in the Documenter issues:

Is there a way to include a link back to the main repository on each page of Documenter.jl? I know that there’s the `Edit on GitHub` link but that always takes me to the documentation source, requiring at least one additional click to get to the main repo page and sometimes, e.g., [here](https://clima.github.io/OceananigansDocumentation/stable/) or [here](https://diffeq.sciml.ai/dev/index.html) it will not help at all, since the documentation repo is separate from the code repo.

It’s seems like such a small thing, but I _constantly_ run into this issue when browsing and evaluating different packages, and thus I was wondering if I am the only one who misses such a functionality. But maybe there is a reasonable explanation why such a link is not included in Documenter?

---

<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:** [March 18, 2021, 6:29am UTC](https://discourse.julialang.org/t/link-back-to-main-repo-on-each-page-in-documenter-jl/57444/2 "2021-03-18T06:29:44Z")

</div>

There isn’t at the moment, but I have a [WIP PR for just that](https://github.com/JuliaDocs/Documenter.jl/pull/1254). Unfortunately, it ended up being a non-trivial amount of refactoring to get it work right, so I quite haven’t had the time to wrap it up yet.

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [March 18, 2021, 6:40am UTC](https://discourse.julialang.org/t/link-back-to-main-repo-on-each-page-in-documenter-jl/57444/3 "2021-03-18T06:40:12Z")

</div>

Agreed.

> [@Plea to package developers regarding documentation!](https://discourse.julialang.org/t/plea-to-package-developers-regarding-documentation/37473):
>
> Very serious topic ahead: Please please please can package developers put a link BACK to the source repo inside your documentation! Without it, the documentation becomes a trap. Randomly selected example: [StatsBase.jl Documentation · StatsBase.jl](https://juliastats.org/StatsBase.jl/stable/) It is becoming more common now that Google is taking me to documentation pages rather than the Github repo. I frequently flip back and forth between code and documentation, but this process is beyond cumbersome if the documentation contains no easily…

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [March 18, 2021, 6:53am UTC](https://discourse.julialang.org/t/link-back-to-main-repo-on-each-page-in-documenter-jl/57444/4 "2021-03-18T06:53:30Z")

</div>

I agree. As a _package user_ and landing to a new package documentstion page, one of the most frequent things I want to do is to go to the main github package page.  
As a _package developer_, what I did is to manually add a link to it on top of my main documentation home page.

---

<div class="post-metadata">

**Author:** ![sloede](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sloede/32/44787_2.png) [@sloede](https://discourse.julialang.org/u/sloede)\
**Post date:** [March 18, 2021, 7:29am UTC](https://discourse.julialang.org/t/link-back-to-main-repo-on-each-page-in-documenter-jl/57444/5 "2021-03-18T07:29:23Z")

</div>

> [@sylvaticus](#):
>
> As a _package developer_ , what I did is to manually add a link to it on top of my main documentation home page.

Haha, same [here](https://github.com/trixi-framework/Trixi.jl/pull/481/files)!

> [@mortenpi](#):
>
> There isn’t at the moment, but I have a [WIP PR for just that](https://github.com/JuliaDocs/Documenter.jl/pull/1254). Unfortunately, it ended up being a non-trivial amount of refactoring to get it work right, so I quite haven’t had the time to wrap it up yet.

Wow, I have completely missed that, sorry. Is there anything the community can help to get this PR finished? Not that I claim knowing enough about Documenter’s internals to be of any useful assistance, but maybe there’s something else I can do?

---

<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:** [March 23, 2021, 5:44am UTC](https://discourse.julialang.org/t/link-back-to-main-repo-on-each-page-in-documenter-jl/57444/6 "2021-03-23T05:44:04Z")

</div>

> [@sloede](#):
>
> > [@mortenpi](#):
> >
> > There isn’t at the moment, but I have a [WIP PR for just that](https://github.com/JuliaDocs/Documenter.jl/pull/1254). Unfortunately, it ended up being a non-trivial amount of refactoring to get it work right, so I quite haven’t had the time to wrap it up yet.
> 
> Wow, I have completely missed that, sorry. Is there anything the community can help to get this PR finished? Not that I claim knowing enough about Documenter’s internals to be of any useful assistance, but maybe there’s something else I can do?

Primarily it just needs to be brought up to speed with the updates on `master`. Broadly, the PR contains two things: (1) implementation of the link (HTML, CSS), and (2) a refactoring of the `repo` keyword of `makedocs`, so that we would have a good and reliable way of actually determining the URL to the repo. My plan is to split (2) into a separate PR, since that’s the messy bit (and, possibly, to revisit the design decision I made when I started the PR) — if someone wants to beat me to it, you are more than welcome to do so 🙂

---

<div class="post-metadata">

**Author:** ![sloede](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sloede/32/44787_2.png) [@sloede](https://discourse.julialang.org/u/sloede)\
**Post date:** [March 23, 2021, 6:32am UTC](https://discourse.julialang.org/t/link-back-to-main-repo-on-each-page-in-documenter-jl/57444/7 "2021-03-23T06:32:56Z")

</div>

Thanks for the overview. I had a look at the PR to see how hard it would be to factor out (2), but it seems that any meaningful contribution from my side at this point exceeds my time budget :-/, mostly since essentially everything is new for me…
