Skip to content

Instantly share code, notes, and snippets.

@daranzolin
Created February 9, 2023 00:15
Show Gist options
  • Save daranzolin/bcf458ccfe0caa65efd4b84854508389 to your computer and use it in GitHub Desktop.
Save daranzolin/bcf458ccfe0caa65efd4b84854508389 to your computer and use it in GitHub Desktop.
```{r}
path <- fs::path("mtcars", ext = "csv")
cmd <- paste0("{{< downloadthis ", "'", path, "'", ' dname=Mtcars label="Download the mtcars data" icon=database-fill-down type=info class=data-button id=mtcars >}}')
```
```{r}
#| results: asis
cat(cmd)
```
---
title: "template"
format: html
---
```{r}
#| results = "asis"
src = knitr::knit_expand('child.qmd')
res = knitr::knit_child(text = unlist(src), quiet = TRUE)
cat(res, sep = '\n')
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment