zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.42k stars 1.93k forks source link

(Feature request) Show attributes on shared notes #2488

Open sigaloid opened 2 years ago

sigaloid commented 2 years ago

Describe feature

For example, if I share a note that was saved using the webclipper, there is no context that it's a saved webpage or the original URL.

I think showing some attributes on shared notes (maybe in an inconspicuous spot) might be helpful.

I tried implementing this but the note object given in content_renderer.js does not have attributes in it, or at least oddly enough not all of them. I added custom attributes to notes then did console.log(note) from within content_renderer.js and none of the attributes showed up in the note info that was outputted.

Additional Information

Mockup: Screenshot from 2021-12-28 14-34-15

zadam commented 2 years ago

Hi, I made some changes relevant to this area. All attributes are now being loaded and "share scripts" (see wiki) can load them.

Attributes are not displayed by default though. I don't think it's a good idea just to display them all. For now, I would handle only the clear ones (like the clipped notes) and user can add custom handling using these script notes.