rogtemplate is a private pkgdown template for core rOpenGov package sites. It provides site setup helpers, package asset helpers and rOpenGov color palettes.
Please do not use it for your own code.
You can deploy your pkgdown site with rogtemplate through a GitHub Action or build it locally. The GitHub Action is automatic after setup. A local build gives you more control.
You do not need to install rogtemplate itself. First copy this
workflow
file
to your .github/workflows/ folder.
Then go to YOUR_GITHUB_REPO > Settings > Pages and deploy your
website from the gh-pages branch.
You can install rogtemplate from r-universe:
install.packages("rogtemplate",
repos = c("https://ropengov.r-universe.dev", "https://cloud.r-project.org")
)You can also use the pak package:
pak::pak("ropengov/rogtemplate")Use rog_actions_pkgdown_branch() to set up the workflow described
above. The deployment is still performed by a GitHub Action.
To build your package locally into the docs folder, use:
rogtemplate::rog_build()
# or use
rogtemplate::rog_add_template_pkgdown()
pkgdown::build_site()rogtemplate::rog_add_template_pkgdown() creates a _pkgdown.yml file
or modifies an existing one, with these lines:
template:
bootstrap: 5
package: rogtemplateThese lines tell pkgdown to use rogtemplate.
The last step is to commit to GitHub. If you use the GitHub Action workflow, wait until it finishes, then deploy the website from YOUR_GITHUB_REPO > Settings > Pages.
rogtemplate also provides package asset helpers for badges, logos and fonts, plus rOpenGov color palettes. See the reference index for details.
