Open nonsleepr opened 6 months ago
Hello, I'm not experienced with this repo, so apologies in advance if I state something obvious :) I've recently discovered 2 issues with logseq omvnivore plugin, and I'm interested if this PR tackles either / both of them.
1) If I add a note to the article itself (important - not a note for any of the highlights) then this note does not appear anywhere after I sync omnivore data from logseq. I've checked my config file and my default article template doesn't seem to have a {{{note}}}
field by default. This is what I have in my .logseq\settings\logseq-omnivore.json
:
"articleTemplate": "[{{{title}}}]({{{omnivoreUrl}}})\ncollapsed:: true\nsite:: {{#siteName}}[{{{siteName}}}]{{/siteName}}({{{originalUrl}}})\n{{#author}}\nauthor:: {{{author}}}\n{{/author}}\n{{#labels.length}}\nlabels:: {{#labels}}[[{{{name}}}]] {{/labels}}\n{{/labels.length}}\ndate-saved:: {{{dateSaved}}}\n{{#datePublished}}\ndate-published:: {{{datePublished}}}\n{{/datePublished}}"
2) Then, if I add {{{note}}}
to the above and resync the data, then the article note starts appearing after the sync. But if the note has multiple lines, then it breaks the article block, as only the 1st line of the note is attached to that block. (and the remaining lines get added as new blocks)
If I understand correctly, your PR resolves issue 2) that I've described? Does it also help with 1)?
@artjomsR, yeah, I had exactly the same issue and that's what that PR attempts to solve. It solves both 1. and 2. in your example but it's somewhat opinionated, besides Hightligts block you'd get with original plugin you'd also get a Note block with a document (not highlight) note.
That’s great, thank you so much for the PR and explaining :)
The notes from Omnivore notebook are currently only available as
{{{note}}}
in the template. Given that the note can be a free-form text, there is a high probability of the note breaking the formatting.This PR creates a
### Note
block right above the### Highlights
and puts each line of the note into a separate child block.