-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresentations.qmd
31 lines (23 loc) · 962 Bytes
/
presentations.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
---
title: "Presentations"
---
# Presentations
Examples of external presentations, sorted by date:
```{r, echo=FALSE, results='asis'}
# Define the folder path where presentations are stored
presentations_dir <- "presentations/"
# List all files in the presentations folder
presentations <- list.files(path = presentations_dir, pattern = "*.html", full.names = FALSE)
# Sort presentations by date (assuming filenames start with a date in YYYY-MM-DD format)
presentations <- sort(presentations, decreasing = TRUE)
# Generate links to each presentation using HTML
cat("<ul>\n")
for (file in presentations) {
# Extract the presentation date and title from the filename
date <- substr(file, 1, 10)
title <- gsub("_", " ", substr(file, 12, nchar(file) - 5)) # Removes the date and ".html"
# Create an HTML link for each presentation
cat(paste0("<li><a href='", presentations_dir, file, "'>", date, ": ", title, "</a></li>\n"))
}
cat("</ul>\n")
```