Skip to content
Discussion options

You must be logged in to vote

I found a way for R using an rmarkdown "trick".
Although, I wonder if something more general than the rmarkdown::metadata list trick is possible in Quarto, but I think it's a feature that could be very handy.

---
title: Title
format:
  html:
    css: style.scss
---

```{r}
readLines(rmarkdown::metadata[["format"]][["html"]][["css"]])
```


Original post:

I drop my idea here, but there is something I quite not understand yet.

---
title: Title
format:
  html:
    css: style.scss
params:
  style-file: "{{< meta format.html.css >}}"
---

Test {{< meta format.html.css >}}

```{r}
params[["style-file"]] == "style.scss"
print(params[["style-file"]])
print("style.scss")
```

EDIT: Funny, when tes…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@DamonCharlesRoberts
Comment options

@mcanouil
Comment options

@DamonCharlesRoberts
Comment options

Answer selected by DamonCharlesRoberts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants