Skip to content

rOpenGov/rogtemplate

Repository files navigation

rogtemplate

rOpenGov package R build status r-universe Project Status: Concept – Minimal or no implementation has been done yet or the repository is only intended to be a limited example, demo or proof-of-concept.

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.

Using rogtemplate

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.

Option A: Deploy with a GitHub Action

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.

Option B: Build after installing rogtemplate

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: rogtemplate

These lines tell pkgdown to use rogtemplate.

Commit to GitHub and deploy

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.

Package assets and palettes

rogtemplate also provides package asset helpers for badges, logos and fonts, plus rOpenGov color palettes. See the reference index for details.

About

pkgdown template for rOpenGov packages

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Contributing

Stars

2 stars

Watchers

13 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors