Skip to content
Discussion options

You must be logged in to vote

No, there isn't. As you've noticed, the include functionality is pretty narrow. That's currently by design, because the semantics of inclusions are very confusing.  Quarto used to do something only slightly more complex in terms of directory resolution and we had to revert the change because the behavior was very unintuitive.

There is a general technique you can use, and that is to use root-relative ("absolute") paths, starting with a /. If you write {{< include /path/to/include.md >}} then that path gets resolved relative to the project website, independently of the path of the current file. This allows you to create a subdirectory of useful snippets and then refer to them consistently.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cscheid
Comment options

Answer selected by LisaHopcroft
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