In a presentation, I have a slide.qmd in a directory that i want to reference with its path: "DIRECTORY TO SLIDE"
How can i write this in a variable or meta so i don't have to write the entire "DIRECTORY TO SLIDE" every time?
Thank you for the help you can provide,
---
title: my title
author: my name
format: revealjs
---
## First slide
- with some text content
{{< include <DIRECTORY TO SLIDE>/slide1.qmd >}}
{{< include <DIRECTORY TO SLIDE>/slide2.qmd >}}
## Last slide
end of slides
You can define the directory once in the YAML metadata and reference it with a Quarto variable.
For example:
---
title: my title
author: my name
format: revealjs
slide_dir: "DIRECTORY TO SLIDE"
---
Then use:
{{< include {{< meta slide_dir >}}/slide1.qmd >}}
{{< include {{< meta slide_dir >}}/slide2.qmd >}}
This keeps the path in one place, so if the directory changes, you only need to update the YAML.
Hi @emmawalter45 , thank you for your suggestion. Unfortunately, this does not work for me, it gives me a redering error. 