-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.Rmd
30 lines (26 loc) · 680 Bytes
/
index.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
---
title: "Slides"
output:
html_document:
theme: paper
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(htmltools)
library(purrr)
library(stringr)
files <- dir(".", recursive = TRUE, pattern = "index.html", full.names = TRUE)
files <- setdiff(files, "./index.html")
files <- sort(files, decreasing = TRUE)
files <- keep(files, function(x) length(unlist(str_extract_all(x, "/"))) == 2)
```
```{r, results='asis', echo=FALSE}
files %>%
map(dirname) %>%
map(str_replace, "./", "") %>%
map(str_replace_all, "-", " ") %>%
map(str_to_title) %>%
map2(files, function(x, y) tags$a(x, href = y)) %>%
map(tags$li) %>%
tags$ul()
```