Closed olbeck closed 2 weeks ago
There needs to be a step 2.1 here to ensure the docs folder gets pushed correctly and is being read by the yaml.
Make sure "^docs$" is IN the .Rbuildignore
Make sure "docs/" is NOT IN .gitignore
Add "destination: docs" to line 2 of _pkgdown.yml in main directory.
fixed in docs/README.md
These are the steps I used to initialize the pkgdown, the have the website be built from main/doc (not default "git-pages" brach).
Do not use
usethis::use_pkgdown_github_pages()
. We do not want their defaults so we will do it manually.DO NOT PUSH TO GITHUB YET
At this point, when you push to GitHub, the site is active at username.github.io/packagename ( you can see the link in the settings>pages page), but the link is not active on your main github.com/username/packagename site. To do that, open the website github.com/username/packagename, on the "About" section click the gear icon, then check the "Use your GitHub Pages website" box. Once you hit save, the package site link will appear on the repo main page.
This should be all you need to do initialize the GitHub pages website.
Everytime you update the funcitons in the package • Update documentation with
devtools::document()
(and do any other devtools updates you need to do) • Check package • Build package • Update website with pkgdown::build_site() • Push - After you push to GitHub, there will be an action to update the website, it will take a few minutes.