JuliaDocs / Documenter.jl

A documentation generator for Julia.
https://documenter.juliadocs.org
MIT License
814 stars 482 forks source link

"Edit on Github" link points to master instead of custom devbranch #1375

Closed vlandau closed 4 years ago

vlandau commented 4 years ago

I recently changed the primary branch for Omniscape.jl from master to main, with the plan to eventually get rid of the master branch. Everything works great but I noticed that the "Edit on GitHub" button that appears on the docs page still points to master. If possible, it would be great if this link could be made to point to the devbranch.

mortenpi commented 4 years ago

Passing edit_link = "main" to HTML(...) should fix that. Unfortunately, it's necessary to make that change in two places, because makedocs does not know anything the deploydocs options (and vice versa).

vlandau commented 4 years ago

What are the two places where I need to make the change? Thanks for your help!

mortenpi commented 4 years ago

One place is devbranch, which you already set up. The other one is adding edit_link = "main" to here: https://github.com/Circuitscape/Omniscape.jl/blob/86f4549341d144e4348044510cf2dc15cb3422b1/docs/make.jl#L4-L6

vlandau commented 4 years ago

Thanks so much @mortenpi! I appreciate the help. I will try this now and close this issue once I'ts working.

vlandau commented 4 years ago

Alright, everything is working! (btw the argument name was edit_branch not edit_link, but figured that out easily enough from the stack trace). Thanks again!