-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
108 lines (76 loc) · 3.03 KB
/
README.Rmd
File metadata and controls
108 lines (76 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r}
#| include: false
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
tidy = "styler",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rogtemplate <a href='https://ropengov.github.io/rogtemplate/'><img src="man/figures/logo.png" align="right" height="139"/></a>
<!-- badges: start -->
[](https://ropengov.org/)
[](https://github.com/rOpenGov/rogtemplate/actions)
[](https://ropengov.r-universe.dev/rogtemplate)
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->
This package is a **pkgdown** template adapted to
[rOpenGov](https://ropengov.org/) 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. First copy [this
file](https://github.com/rOpenGov/rogtemplate/blob/main/inst/yaml/rogtemplate-gh-pages.yaml)
into your `.github/workflows/` folder.
Next go to *YOUR_GITHUB_REPO\>Settings\>GitHub Pages* and deploy your website
from the `gh-pages` branch.
### Option B: Deploy installing rogtemplate
You can install **rogtemplate** using the
[r-universe](https://ropengov.r-universe.dev/rogtemplate):
```{r}
#| eval: false
install.packages("rogtemplate",
repos = c("https://ropengov.r-universe.dev", "https://cloud.r-project.org")
)
```
You can use also the **pak** package:
```{r}
#| eval: false
pak::pak("ropengov/rogtemplate")
```
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:
```{r}
#| eval: false
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.yaml`
file (or modify an existing one) with the following lines:
``` yaml
template:
bootstrap: 5
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](https://ropengov.github.io/rogtemplate/reference/index.html) for
more info.