-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listing YAML breaks headers when included with no newline #12066
Comments
Did you try the latest pre-release? When using pre-release, please always use the latest and avoid making comparisons with past versions before trying out the latest version first. What's the use case where you need to include a file with a YAML frontmatter such as a listing to a page, instead of defining the listing directly in that page? |
Thanks for the response. I looked into this more and I narrowed down the issue: It happens when you have a section heading directly above your include (with no line in between) ---
title: "demo"
---
# Blog content
{{< include _index.qmd >}} And sorry I should have specified. I noticed the issue on the latest pre-release (1.7.13) but I did a bifurcation to track the issue down to the 1.7.4 update. This screenshot is with 1.7.13. Use case: me and my colleague are trying to rebuild our website in Quarto and to help modularize the homepage, he put the news listing in a subfile. It's easy enough to avoid this issue by either defining the listing in the main file or to, it appears, put a newline after the heading. |
Gotcha, that makes sense. Thanks for your time. I'm going to close this issue now since everything is behaving as expected. |
I'm reopening because the lead maintainer might want to either ensure empty lines are added by the "include shortcode" and/or keep this for future linting, etc. |
Bug description
I don't know if this is a regression or if it was never the intended behaviour to put a listing definition in an included file.
Starting in v1.7.4, if you have the listing YAML definition in an included file, it is echoed when it's included (but is still processed)
Steps to reproduce
_quarto.yml:
index.qmd
# News {{< include news.qmd >}}
news.qmd
news/newsitem.qmd
Expected behavior
v1.7.3:
Actual behavior
v1.7.4:
Your environment
No response
Quarto check output
`quarto check` output
The text was updated successfully, but these errors were encountered: