Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
R
 
 
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

rogtemplate

rOG-badge R build status r-universe lifecycle

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.

Using rogtemplate

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. Just copy this file into your .github/workflows/ folder.

The action would create your site in the gh-pages branch.

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 action.

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()

Note that rogtemplate::rog_add_template_pkgdown() creates a _pkgdown.yml file (or modify an existing one) with the following lines:

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.

Extras

We provide also some additional extra functions for creating badges and logos, see Extras for more info.