omnivore-app / obsidian-omnivore

Obsidian plugin to fetch articles and highlights from Omnivore
MIT License
757 stars 41 forks source link

feat: expose the highlight id as a variable for use in the template #78

Closed dliberalesso closed 1 year ago

dliberalesso commented 1 year ago

It has been pointed to me that any new highlight might rewrite the whole file in obsidian, potentially deleting any block references that point to the highlights file.

By using the higlight id in the template (as shown below), we can prevent any issues that may arise from rewriting the whole highlights file.

# {{{title}}}
#Omnivore

[Read on Omnivore]({{{omnivoreUrl}}})
[Read Original]({{{originalUrl}}})

{{#highlights.length}}
## Highlights

{{#highlights}}
> {{{text}}} [⤴️]({{{highlightUrl}}}) {{#labels}} #{{name}} {{/labels}}
^omni{{highlightID}}
{{#note}}

{{{note}}}
^omni{{highlightID}}n
{{/note}}

{{/highlights}}
{{/highlights.length}}
sywhb commented 1 year ago

I will include this change in the next release!

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.4.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: