You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I add a new function to my package but forget to add it to _pkgdown.yml, then the pkgdown build on Github will fail. It would be nice if one of the git hooks wouid warn me about this.
I'm not sure if the warning should be a pre-commit or pre-push warning.
Currently I don't have a pre-push hook, but I have a pre-commit hook that checks that README.md has been updated after README.Rmd was changed. I believe that hook was installed by usethis::use_readme_rmd(). I don't think anything in usethis installs a pre-push hook, so it would probably be easiest to do that, so you don't need to worry about merging the two hooks. I think usethis::use_pkgdown() would be the place to put it.
A test could be that if NAMESPACE is newer than docs/reference/index.html, it could suggest running pkgdown::build_site() or maybe pkgdown::build_reference(), which should update the index file.
The text was updated successfully, but these errors were encountered:
The test I suggested above is not sufficient. I just split a help page that was covering multiple functions into separate help pages, and that was enough to cause build_site() to fail. So maybe the test should be something like trying to run pkgdown::build_reference_index().
If I add a new function to my package but forget to add it to
_pkgdown.yml
, then the pkgdown build on Github will fail. It would be nice if one of the git hooks wouid warn me about this.I'm not sure if the warning should be a pre-commit or pre-push warning.
Currently I don't have a pre-push hook, but I have a pre-commit hook that checks that
README.md
has been updated afterREADME.Rmd
was changed. I believe that hook was installed byusethis::use_readme_rmd()
. I don't think anything inusethis
installs apre-push
hook, so it would probably be easiest to do that, so you don't need to worry about merging the two hooks. I thinkusethis::use_pkgdown()
would be the place to put it.A test could be that if
NAMESPACE
is newer thandocs/reference/index.html
, it could suggest runningpkgdown::build_site()
or maybepkgdown::build_reference()
, which should update the index file.The text was updated successfully, but these errors were encountered: