-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.qmd
129 lines (111 loc) · 4.68 KB
/
index.qmd
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
knitr:
opts_chunk:
collapse: true
execute:
echo: false
page-layout: full
include-in-header:
- _includes/fontawesome-2up.html
- _includes/mastodon.html
---
::: {.grid}
::: {.g-col-12}
[Hello and welcome!]{.home-header}
:::
::: {.g-col-12 .g-col-md-4}
<div class="card h-100" id="card-first-color">
<div class="card-body d-flex flex-column">
<p class="card-text">About me, my interests and experience, and my work as a Research Software Engineer.</p>
<div style="margin-top: auto;"><a href="about.qmd" class="card-link heading-font">ABOUT</a></div>
</div>
</div>
:::
::: {.g-col-12 .g-col-md-4}
<div class="card h-100" id="card-second-color">
<div class="card-body d-flex flex-column">
<p class="card-text">I sometimes write about what I'm doing and learning, mostly about <i class="fa-brands fa-r-project" aria-label="R project"></i> and building websites.</p>
<div style="margin-top: auto;"><a href="posts.qmd" class="card-link second-color-link heading-font">POSTS</a></div>
</div>
</div>
:::
::: {.g-col-12 .g-col-md-4}
<div class="card h-100" id="card-third-color">
<div class="card-body d-flex flex-column">
<p class="card-text">Slides and resources from talks I've given at R and RLadies user groups and conferences.</p>
<div style="margin-top: auto;"><a href="talks.qmd" class="card-link third-color-link heading-font">TALKS</a></div>
</div>
</div>
:::
::: {.g-col-12 .g-col-md-4}
<div class="card h-100" id="card-second-color">
<div class="card-body d-flex flex-column">
<p class="card-text">I develop R packages. Here are links to their repos, websites and any other resources. </p>
<div style="margin-top: auto;"><a href="packages.qmd" class="card-link second-color-link heading-font">PACKAGES</a></div>
</div>
</div>
:::
::: {.g-col-12 .g-col-md-4}
<div class="card h-100" id="card-third-color">
<div class="card-body d-flex flex-column">
<p class="card-text">I love the R community! Here's how to get involved, and groups I help organise or contribute to.</p>
<div style="margin-top: auto;"><a href="community.qmd" class="card-link third-color-link heading-font">COMMUNITY</a></div>
</div>
</div>
:::
::: {.g-col-12 .g-col-md-4}
<div class="card h-100" id="card-first-color">
<div class="card-body d-flex flex-column">
<p class="card-text">Where to find me online and how to get in touch. I'd love to hear from you!</p>
<div style="margin-top: auto;"><a href="contact.qmd" class="card-link heading-font">CONTACT</a></div>
</div>
</div>
:::
:::
```{r}
#| echo: false
# redirects strategy from djnavarro
# https://blog.djnavarro.net/posts/2022-04-20_porting-to-quarto/#netlify-redirects
# list names of posts, talks and packages folders
posts <- list.dirs(
path = here::here("posts"),
full.names = FALSE,
recursive = FALSE
)
talks <- list.dirs(
path = here::here("talks"),
full.names = FALSE,
recursive = FALSE
)
packages <- list.dirs(
path = here::here("packages"),
full.names = FALSE,
recursive = FALSE
)
# extract the slugs
posts_slugs <- gsub("^.*_", "", posts)
talks_slugs <- gsub("^.*_", "", talks)
packages_slugs <- gsub("^.*_", "", packages)
# redirects from distill site
distill_redirects <- c("/posts/2017-06-17-n-letter-words/ /posts/2017-06-17_n-letter-words/",
"/posts/2020-12-09-advent-of-code-2020/ /2020-12-09_advent-of-code-2020/",
"/2021-05-08-welcome-to-my-distill-website/ /posts/2021-05-08_welcome-distill/",
"/posts/2021-05-25-custom-syntax-highlighting-for-distill-part-1-modifying-the-default-theme/ /posts/2021-05-25_custom-highlighting-distill-1/",
"/2021-05-26-custom-syntax-highlighting-for-distill-part-2-creating-the-palette/ /posts/2021-05-26_custom-highlighting-distill-2/",
"/talks/2017-05-25-an-overview-of-htmlwidgets/ /talks/2017-05-25_overview-of-htmlwidgets/",
"/talks/2017-07-06-introducing-bradleyterryscalable/ /talks/2017-07-06_introducing-bradleyterryscalable/",
"/talks/2018-08-23-phd-as-package/ /talks/2018-08-23_phd-as-package/",
"/talks/2019-10-05-working-with-text-in-r/ /talks/2019-10-05_working-with-text-in-r/",
"/talks/2020-10-29-how-to-get-help-in-r/ /talks/2020-10-29_how-to-get-help-in-r/",
"/projects.html /packages.html")
# lines to insert to a netlify _redirect file
posts_redirects <- paste0("/", posts_slugs, " ", "/posts/", posts)
talks_redirects <- paste0("/", talks_slugs, " ", "/talks/", talks)
packages_redirects <- paste0("/", packages_slugs, " ", "/packages/", packages)
redirects <- c(distill_redirects,
posts_redirects,
talks_redirects,
packages_redirects)
# write the _redirect file
writeLines(redirects, here::here("_redirects"))
```