-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.Rmd
More file actions
39 lines (29 loc) · 905 Bytes
/
index.Rmd
File metadata and controls
39 lines (29 loc) · 905 Bytes
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
---
title: "Slide Sitemap"
output: html_document
---
```{r message = FALSE, warning = FALSE, echo = FALSE}
library(gt)
library(tidyverse)
library(stringi)
make_full = function(myurl,gituser="R-Computing-Lab",myrepo="slides") {
paste0('https://',gituser,'.github.io/',myrepo,'/',myurl)
# paste0('https://',gituser,'.github.io/',myurl)
}
make_hyperlink = function(myurl,mytext=myurl) {
paste0('<a href="',myurl,'">',mytext,'</a>')
}
df_docs=list.files(path="../slides/.", '[.]html$', recursive=TRUE)
#df_docs=list.files( '[.]html$', recursive=TRUE)
df <- data.frame(
stringsAsFactors = FALSE,
# title = str_replace_all(str_remove(df_docs, "\\.html"),"[_-]"," "),
title = str_remove(df_docs, "\\.html"),
link = make_full(df_docs)
)
df %>%
mutate(
link = glue::glue("[slides]({link})"),
link = map(link, gt::md)) %>%
gt()
```