-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBehindTheScenes.Rmd
49 lines (35 loc) · 1.22 KB
/
BehindTheScenes.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
---
title: "Behind The Scenes - common steps"
author: "Wendy Leuenberger"
date: "`r Sys.Date()`"
output: html_document
---
# Editing the zipkinlab.github.io repo
Code to do so if the repo is cloned to your computer and edits are done through RStudio.
### Add the figure
Move figure from download to assets/images
Bash script: Ctrl + Alt + Enter on a Windows in RStudio
```{bash}
mv ../../../Downloads/Gilbert_etal_2024_Ecol.png assets/images/Gilbert_etal_2024_Ecol.png
git add assets/images/Gilbert_etal_2024_Ecol.png
git commit -m 'Added Gilbert_etal_2024_Ecol.png to images'
```
Calculate figure size
R script: Ctrl + Enter on a Windows in RStudio
```{r}
FigSize <- function(OriginalWidth, OriginalHeight, OutputWidth = 200){
WidthRatio <- OutputWidth / OriginalWidth
OutputHeight <- OriginalHeight * WidthRatio
cat(paste0('Width = ', round(OutputWidth), '\nHeight = ', round(OutputHeight)))
}
FigSize(OriginalWidth = 4500, OriginalHeight = 3000)
```
## Once you've added other text
Add and commit change to front page
Rerun as needed for additional editing
Bash script: Ctrl + Alt + Enter on a Windows in RStudio
```{bash}
git add index.html
git commit -m 'Added Ayebare_etal_2023_ProcB to front-facing page'
git push
```