-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
62 lines (40 loc) · 2.99 KB
/
README.Rmd
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# Website for Digital Agriculture (Dier & Data) at Utrecht University
<https://bovi-analytics.github.io/DigitalAgriculture/>
[Miel Hostens](https://www.bovi-analytics.com/) • Faculty of Veterinary Medicine • Utrecht University
## After updating R
[Source](https://inbo.github.io/tutorials/tutorials/r_renv_update/)
``` r
renv::upgrade() # upgrades renv, if new version is available
renv::hydrate(update = "all")
renv::snapshot() # inspect the message before confirming to overwrite renv.lock
```
## How to build the site
1. Install [RStudio](https://www.rstudio.com/products/rstudio/download/#download) version 2022.07.1 or later since it has a [Quarto](https://quarto.org/) installation embedded in it. Otherwise, download and install [Quarto](https://quarto.org/) separately.
2. Open `bovi-analytics.Rproj` to open an [RStudio Project](https://r4ds.had.co.nz/workflow-projects.html).
3. If it's not installed already, R *should* try to install the [{renv} package](https://rstudio.github.io/renv/) when you open the RStudio Project for the first time. If you don't see a message about package installation, install it yourself by running `install.packages("renv")` in the R console.
4. Run `renv::restore()` in the R console to install all the required packages for this project.
5. `r emoji::emoji("tada")` All done! `r emoji::emoji("tada")` The complete website will be in a folder named `_site/`.
```{bash}
quarto publish gh-pages --no-browser --no-prompt
```
The pipeline does major tasks:
- **Build Quarto website**: This project is a [Quarto website](https://quarto.org/docs/websites/), which compiles and stitches together all the `.qmd` files in this project based on the settings in [`_quarto.yml`](_quarto.yml). See the [Quarto website documentation](https://quarto.org/docs/websites/) for more details.
- **Upload resulting `_site/` folder to github pages**: This project is published using github pages using the `quarto publish gh-pages --no-browser` command
## Licenses
**Text and figures:** All prose and images are licensed under Creative Commons ([CC-BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/))
**Code:** All code is licensed under the [MIT License](LICENSE.md).
## Issues
If ' 'gh-pages' is already checked out' error occurs -\> remove any folder in the .git/worktree folder
## Attribution
Much of the content is based on [Digital Agriculture](https://bovi-analytics.github.io/DigitalAgriculture/) by Dr. Miel Hostens.
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" alt="Creative Commons License" style="border-width:0"/></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>