Open kavun opened 1 year ago
With a template like this, with content only expected to render if note exists, the content does not get rendered.
content
note
{{#note}} ## Notes {{{note}}} ## Full Article {{{content}}} {{/note}}
This is because includeContent is only set to true when content is at the "root" level of the mustache template. https://github.com/omnivore-app/obsidian-omnivore/blob/2304fde1516164fb42d2f2258db2c5510252c023/src/main.ts#L204-L206
includeContent
true
In my case, content is under the note span.
As a workaround, I have added a "root" level comment span with the text content, and this does force includeContent to be true and my content to get imported, but ideally I wouldn't have to hack it like this.
{{! content }} {{#note}} ## Notes {{{note}}} ## Full Article {{{content}}} {{/note}}
FWIW, the Logseq plugin always fetches content https://github.com/omnivore-app/logseq-omnivore/blob/83484a66ae7cbb9b71e853e9da8c73dbffcf8fb6/src/index.ts#L228
With a template like this, with
content
only expected to render ifnote
exists, thecontent
does not get rendered.This is because
includeContent
is only set totrue
whencontent
is at the "root" level of the mustache template. https://github.com/omnivore-app/obsidian-omnivore/blob/2304fde1516164fb42d2f2258db2c5510252c023/src/main.ts#L204-L206In my case,
content
is under thenote
span.As a workaround, I have added a "root" level comment span with the text
content
, and this does forceincludeContent
to betrue
and my content to get imported, but ideally I wouldn't have to hack it like this.