How can i write a PATH in a variable or meta so i don't have to write the entire "DIRECTORY_TO_SLIDE" every time?
#14792
Unanswered
stefaniecg
asked this question in
Q&A
Replies: 2 comments 1 reply
|
You can't do that with an include shortcode. You can use a Lua filter to do it, though. |
1 reply
|
I tried with the Lua filters, but no success. mypres.qmd ---
title: my title
author: my name
format: revealjs
filters:
- pathfinder.lua
---
## First slide
- with some text content
<!-- this does not work -->
{{path_to_slide}}
<!-- this does work -->
{{< include ./utils/slide.qmd >}}
## Last slide
end of slidespathfinder.lua path1 = "./utils/"
function Str(el)
if el.text == "{{path_to_slide}}" then
el.text = "{{< include " .. path1 .. "slide.qmd >}}"
end
return el
end |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
In a presentation, i want to want to include a slide which is in another directory by using its path: "
DIRECTORY_TO_SLIDE"How can i write this in a
variableormetaso i don't have to write the entire "DIRECTORY_TO_SLIDE" every time?Thank you for the help you can provide,
All reactions