Skip to content

Commit dcc2543

Browse files
committed
feedback
1 parent 7549a58 commit dcc2543

1 file changed

Lines changed: 35 additions & 21 deletions

File tree

slides/05_publication.qmd

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ author: Audrey T. Yeo
1919
## Setup of `pkgdown`
2020

2121
- `pkgdown` makes it quick and easy to build a website for your package
22-
- After installing `pkgdown`, run `usethis::use_pkgdown()` to get started
22+
- After installing `pkgdown`, run `usethis::use_pkgdown()`* to get started
23+
- Alternatively, run `usethis::use_pkgdown_github_pages()`
24+
- Adds (and writes) `pkgdown.yml`\*, `docs` folder, and "pkgdown" to `.Rbuildignore`\* and `docs` to `gitignore`\*. Also initialises empty branch `gh-pages` in chosen repo and activates GitHub Pages for repo.
25+
2326
- Main configuration happens in `_pkgdown.yml` file
2427
- Many customizations can be applied, but bulk of work during development is
2528
updating the `reference` section with names of `.Rd` files
@@ -262,50 +265,62 @@ git diff v0.3.14 v0.3.15 # checking for difference in mmrm release
262265
- [CRAN Repository Policy](https://cran.r-project.org/web/packages/policies.html)
263266
- [Bioconductor packages](https://contributions.bioconductor.org/index.html)
264267

265-
# Quick quiz (One correct answer only)
268+
## Quick quiz (One correct answer only)
266269

270+
::: columns
271+
::: {.column width="40%"}
267272
1. I am cloning / forking a repo that has an MIT Licence. Which license shall I use if I want to make modification and distribute my new package ?
268-
269273
a. MIT Licence
270274
b. one of any copyleft Licences
271275
c. no licence assumes transfer of my rights from the original repo
276+
:::
272277

273-
2. I want to build a website for my package. Which file can I _mainly_ configure my website in ?
278+
::: {.column width="10%"}
279+
:::
274280

275-
a. _pkgdown.yml file
281+
::: {.column width="40%"}
282+
2. I want to build a website for my package. Which file can I *mainly* configure my website in ?
283+
\
284+
\
285+
\
286+
a. `_pkgdown.yml` file
276287
b. .gitignore
277288
c. any .Rd file
289+
:::
290+
:::
278291

279-
3. What commands do I use to add an MIT licence AND build a `pkgdown` website using github ?
280-
281-
a. `usethis::use_mit_licence()` AND `usethis::use_pkgdown()`
282-
b. `usethis::use_mit_licence()` AND `usethis::use_pkgdown_github_pages()`
283-
284-
285-
# Quick quiz (Solutions)
292+
## Quick quiz (Solutions)
286293

294+
::: columns
295+
::: {.column width="40%"}
287296
1. I am cloning / forking a repo that has an MIT Licence. Which license shall I use if I want to make modification and distribute my new package ?
288-
289297
a. **MIT Licence**
290298
b. one of any copyleft Licences
291299
c. no licence assumes transfer of my rights from the original repo
300+
:::
292301

293-
2. I want to build a website for my package. Which file can I *mainly* configure my website in ?
302+
::: {.column width="10%"}
303+
:::
294304

305+
::: {.column width="40%"}
306+
2. I want to build a website for my package. Which file can I *mainly* configure my website in ?
307+
\
308+
\
309+
\
295310
a. **`_pkgdown.yml` file**
296311
b. .gitignore
297312
c. any .Rd file
298-
299-
3. What commands do I use to add an MIT licence AND build a `pkgdown` website using github ?
300-
301-
a. `usethis::use_mit_licence()` AND `usethis::use_pkgdown()`
302-
b. **`usethis::use_mit_licence()` AND `usethis::use_pkgdown_github_pages()`**
313+
:::
314+
:::
303315

304316
# Exercise
305317

306318
Use the your project from chapter 5 :
307319

308-
- Run CRAN-like checks in RStudio: use `--as-cran` in argument
320+
- Run CRAN-like checks in RStudio:
321+
- Go to Tools -> Project Options -> Build Tools -> "Check package - R CMD check additional options" : -> type "--as-cran"
322+
323+
- Alternatively, use `--as-cran` in argument in console :
309324

310325
```{r}
311326
#| eval: false
@@ -317,7 +332,6 @@ rcmdcheck::rcmdcheck("myrootdir", args = "--as-cran")
317332
- Enable GitHub page through `use_pkgdown_github_pages`
318333
- (nested in this [`use_pkgdown_github_pages`](https://pkgdown.r-lib.org/articles/pkgdown.html) includes : `use_pkgdown()`, `use_github_pages()`, `use_github_action("pkgdown")`)
319334
- Deploy the website with `pkgdown`
320-
- Need to change remote to `git` TODO
321335
- Set up a GitHub action to deploy website `use_github_action("pkgdown")`
322336
- (Optional) Check the automatic GitHub page deploy action
323337

0 commit comments

Comments
 (0)