This package is a pkgdown template adapted to rOpenGov site.
This is a private template for use by core rOpenGov packages. Please don’t use it for your own code.
It is possible to deploy your pkgdown site along with rogtemplate via CI (GitHub Actions) or locally, that provides more control but it is not automatic.
Option A: Deploy using GitHub Actions
It is not necessary to install rogtemplate itself. First copy this
Next go to YOUR_GITHUB_REPO>Settings>GitHub Pages and deploy your
website from the
Option B: Deploy installing rogtemplate
You can install rogtemplate using the r-universe:
# Enable this universe options(repos = c( ropengov = "https://ropengov.r-universe.dev", CRAN = "https://cloud.r-project.org" )) # Install some packages install.packages("rogtemplate")
You can use also the remotes package:
library(remotes) install_github("ropengov/rogtemplate", dependencies = TRUE)
You can use
rog_actions_pkgdown_branch() for setting up the action
described before but the deployment would be still performed by a GitHub
For building locally your package into your
docs folder use:
rogtemplate::rog_build() # or you can use also rogtemplate::rog_add_template_pkgdown() pkgdown::build_site()
rogtemplate::rog_add_template_pkgdown() creates a
_pkgdown.yml file (or modify an existing one) with the following
template: package: rogtemplate
These lines tells pkgdown to use rogtemplate.
Commit to GitHub and deploy
Last step is commit to GitHub, wait until the GitHub action ends (in the case you chose to deploy in that way) and deploy the website via YOUR_GITHUB_REPO>Settings>GitHub Pages.
We provide also some additional extra functions for creating badges and logos, see Extras for more info.