https://github.com/ropensci-org/rotemplate
pkgdown template and action to build ropensci docs
https://github.com/ropensci-org/rotemplate
pkgdown r r-package rstats
Last synced: 3 months ago
JSON representation
pkgdown template and action to build ropensci docs
- Host: GitHub
- URL: https://github.com/ropensci-org/rotemplate
- Owner: ropensci-org
- License: other
- Created: 2019-03-11T16:04:47.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-05-17T21:42:58.000Z (6 months ago)
- Last Synced: 2025-05-17T22:28:18.805Z (6 months ago)
- Topics: pkgdown, r, r-package, rstats
- Language: R
- Homepage: https://docs.ropensci.org/rotemplate
- Size: 561 KB
- Stars: 25
- Watchers: 1
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - ropensci-org/rotemplate - pkgdown template for rOpenSci packages :nail_care: :sparkles: (R)
README
rotemplate provides **a custom pkgdown template** for rOpenSci packages. We
use this to render sites at `https://docs.ropensci.org`. Please don’t
use it for your own package if it’s not an rOpenSci package (i.e. only
use it for packages listed on ).
Inspired by [tidytemplate](https://github.com/tidyverse/tidytemplate/)
and [lockedatapkg](https://github.com/lockedatapublished/lockedatapkg).
## How to use `rotemplate`
Documentation for rOpenSci packages will automatically be generated from
your default branch and published to . You
don’t need to do anything to make this work. To test your site locally use:
``` r
library(rotemplate)
#install.packages("yourpkg")
rotemplate::build_ropensci_docs("path/to/yourpkg")
```
Preferences can be configured as usual via the `_pkgdown.yml` file
as described in the pkgdown documentation.
If your website is not deploying or you run into another problem, please
open an issue in the [rotemplate](https://github.com/ropensci-org/rotemplate)
repository.
## How it works
The R-universe [build workflow](https://github.com/r-universe/workflows/blob/HEAD/.github/workflows/build.yml)
automatically invokes the rotemplate [action.yml](action.yml) script on each
update of a packages in ropensci. You don't need to do anything for this.
However, if you want to test-build the pkgdown site in your own package CI,
you could add the following test workflow to your package repository:
```yml
on:
push:
pull_request:
name: Test-docs
jobs:
Test-docs:
runs-on: ubuntu-latest
steps:
- uses: ropensci-org/rotemplate@main
```
This will run exactly the same script to build the ropensci pkgdown site, and
store it as an GHA artifact where you can download it to view it locally.
### Math rendering
Please refer to [pkgdown documentation](https://pkgdown.r-lib.org/dev/articles/customise.html#math-rendering).
## Example sites
- [`cyphr`](https://docs.ropensci.org/cyphr/)
- [`drake`](https://docs.ropensci.org/drake/)
- [`riem`](https://docs.ropensci.org/riem/)
- [`rotl`](https://docs.ropensci.org/rotl/)
- [`stplanr`](https://docs.ropensci.org/stplanr/)
- [`visdat`](http://visdat.njtierney.com/)
- [`magick`](https://docs.ropensci.org/magick/)
