Currently devbranch in deploydocs defaults to master. Since GitHub now uses main as the default name of the dev branch, would it make sense to add a deprecation requiring users to explicitly specify the devbranch, so the default could eventually be changed to main?
The vast majority of repos use and likely will use master for a long time so to me it makes sense to keep the current default.
New repositories are created with main now, so I don't think it would be unreasonable to have the default in future Documenter releases to be consistent with that. That said, I don't think it makes sense to hard-break immediately, but deprecating the default value and suggesting people to explicitly declare devbranch might make sense.
I think we also want to keep an eye on how PkgTemplates handles it (#233), since I expect most Documenter configurations nowadays to be generated that way. I assume that, at the moment, PkgTemplates still commits the generated content onto master?
Minimally, we should probably add a note to the docs about this.
PkgTemplates lets you manually specify the default branch, and otherwise uses your init.defaultBranch Git setting, which defaults to master. So in the vast majority of cases, people do still get master. The default with no configuration will probably change to main soon: https://github.com/invenia/PkgTemplates.jl/issues/233
I'll make sure to specify devbranch in generated make.jl to make things easier on everyone.
I'll make sure to specify devbranch in generated make.jl to make things easier on everyone.
Currently working on it :)
I think the right change will require the Git changes I mentioned above, which I'll take care of. Once that's in, you can assume that getplugin(t, Git).branch will return the repo's default branch.
edit: I definitely thought this was the PkgTemplates issue 馃槄 By "mentioned above", I meant https://github.com/invenia/PkgTemplates.jl/issues/233#issuecomment-721442945.
[EDITED]
For those affected, the way to use Documenter to deploy the documentation to GitHub pages is to use the following call to deploydocs in doc/make.jl:
deploydocs(
repo = "github.com/USERNAME/PACKAGENAME.jl.git",
devbranch = "main"
)
Most helpful comment
The vast majority of repos use and likely will use master for a long time so to me it makes sense to keep the current default.