Reputation: 10162
This question is a follow-up to this question.
I have a Quarto blog where I save additional quarto files next to the respective blog articles (index.qmd
), which are then displayed within the blog as example code.
When I render the blog, the additional files are picked up and rendered as separate blog articles as well.
For example, my files look like this, where extra.qmd
is included in the index.qmd
file as part of the blog
posts/
2022-10-31-ex1/
index.qmd # should be rendered as the blog article (works)
extra.qmd # should be ignored by quarto and not be its own article (does not work)
How can I tell Quarto to only render index.qmd
files as blog articles and ignore all other quarto files?
One possible solution is to mark all of the extra files as drafts (YAML header draft: true
), but that changes the content of the extra file, which I don't want.
Upvotes: 3
Views: 669
Reputation: 10162
The solution I found is to use customize the ./index.qmd
file defining the listings like so:
listing:
contents:
- "posts/*/index.qmd"
Upvotes: 2