Can you include
files from a parent directory?
#9956
Replies: 2 comments 1 reply
-
You cannot include a parent directly of a Quarto project by design. Inside a Quarto project a leading If it does not work, please share a small reproducible example and the output of |
Beta Was this translation helpful? Give feedback.
-
Perhaps this is a bug in the VS Code extension? The following fails:
While the following succeeds:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi there, I'm working on building a site with Quarto and I am wondering if the following is possible. Given a project structure such as:
I'd like to use the include shortcode to include content from
includes/snippet_a.qmd
in pages generated bypage_a.qmd
andpage_b.qmd
. Unfortunately, it seems like I can't use the typical syntax to specify a file path relative to the project root in the include shortcode. For example, this doesn't work inpage_a.qmd
:However, it does work if I use a local/relative path, such as:
Is there another way to include files from another directory? Using parent directory syntax like
../something/
works but does not work beyond traversing a single level (i.e.,../../something
does not resolve).Any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions