Hi,
I believe I’ve found a bug and would appreciate you looking into it.
YAML headers are usually hidden in markdown documents. But this doesn’t work correctly when a document containing a YAML header is transcluded. That is, in the transcluded document parts of the YAML header are unexpectedly rendered in preview mode.
Here’s an example to make this more tangible.
I have a document with this YAML header:
---
tags:
- nc_page
- _Stoicism
---
This is the document in preview mode:
However, if I reference it in a transclusion, then part of the YAML header is displayed.
This is how I reference the document.
# Fact_Specialties of the Stoic teachers:
{{x-devonthink-item://9653474A-2010-453C-BF1D-C47ED022F8BE}}
And this is how it’s displayed when I preview the transclusion:
Thanks in advance for looking into this.
Neither DEVONthink nor MultiMarkdown support YAML, a different syntax like…
tags: nc_page, _Stoicism
…is therefore recommended. See also Transclusion of files with yaml - #4 by RDK
Ah, thanks for clarifying.
Well, DT seems to support it in an individual markdown document at least to the extent that the header is not shown in preview mode.
That’s why I was surprised to see the header contents in the transcluded document.
Follow-up question @cgrunenberg
While I understand that YAML tags may not be fully supported now or in the future… doesn’t it make sense to exclude any header contents within the two “—” separators from transcluded documents?
Would you consider supporting this?
May i ask why you’re using YAML metadata instead of just MultiMarkdown metadata?
Sure. That’s because I’m using a spaced repetition tool called Neuracache, which is able to import YAML tags but not multimarkdown tags.
Thanks for the clarification!
Does it accept YAML tags on one line?
No, it requires them to be in the format from my post to be recognized.