weichenw/obsidian-hypothesis-plugin

[Feature Request] Template should allow us to customize the frontmatter

Opened this issue ยท 8 comments

huyz commented

My notes usually have created and updated fields in the frontmatter as part of the core Templates (which are then kept up to date by obsidian-linter).

It would be nice if the template setting actually included the current frontmatter that's injected by this plugin, so that I can add my own fields (also want to add tags:).

It would be even nicer too if the updated date could be filled in to be the most recent date of all the highlights/annotations that are synced. As for the created date, maybe it could be set to the oldest date.

boehs commented

Hi Huy,

Frontmatter is integral to the functionality obsidian-hypothesis, and implementing it in a non dangerous way will require deliberation. Are you ok with:

  1. Keeping the doc_type and url frontmatter? It would be much much harder to ditch those
  2. A very rudimentary implementation, you would be writing json like a caveman, no yaml for you!

Still, with those clauses this is absolutely possible and I would be happy to implement it

boehs commented

Actually I don't care about your opinion. Frontmatter here we come!!!!!! ๐Ÿ˜œ

huyz commented

@boehs At first glance, sounds good to me. Any first iteration is a good idea.

fncll commented

Would this allow me to create a template such that the date the page of annotations was created was added to the metadata and not changed/replaced upon subsequent updates? This is what I would like to do in order to automate pulling in "things read on Date X" based on that being that initial date.

Any progress with the possibility to use frontmatter in template? I'd love to have it!

@boehs , is it possible to get the date (of the first annotation and/or the last update) at the article level in the front matter?

+1 It's the only thing that keeps me from using this plugin.

@weichenw any chance you can take a look? ๐Ÿ™