Automatic note embed above certain notes

TL;DR A plugin for creating custom note headers which render Markdown on notes given folder or tag filters, for avoiding the clutter of plugin-specific markup in every note.


Why

For the Dataview/Datacore/Meta Bind/everything else nerds who like their meticulously crafted dashboards or callouts at the top of all their notes, they often have to just stick it in a template. However, this pollutes notes with junk that would be useless and distracting outside Obsidian.

Personally, for my TTRPG vault, I use a Meta Bind code blocks to manage inputting orderly metadata, loosely based on ProStachio / Bag of Tips’s vaults. That means I have a huge chunk of callouts and code blocks at the top of each note, which clutters it incredibly when I am reading the note in another program.

Some might like placing Dataview blocks at the top of their notes to display a banner, a quote, or a toolbar-like navigation menu. Doing any of this would currently involve setting up a template and clogging all new notes with junk.

I have had success with mitigating junk at the top of my files by using Meta Bind’s embeds to embed reusable note headers while preserving the current file’s context, unlike regular embeds, allowing for file-specific Dataview queries to work. This was great – 50+ lines of clutter turned to 3. However, I’d like to stick to my ideals of having no plugin-specific markup in my normal notes, hence why this plugin would be useful.

This image demonstrates what most of the notes in my TTRPG vault look like. Beautiful in Obsidian when it’s fully rendered out, but once you look under the surface, it’s a lot of junk. Meta Bind Embeds help enormously (~100 lines => ~10), but I’d love to be rid of any impermanent, proprietary markup.

Implementation

There are a few plugins that I’ve used that do similar things that may be useful for reference.

The plugin would have a settings menu for creating new Headers. Each Header would have a filter: a tag, folder, or possibly even a Dataview query, to determine on what notes it should render. Some other settings could be useful, like a switch to disable the Header on live preview mode, or a setting to select between placing the embed at the top or bottom of the note. In this regard, the Note Toolbar plugin is a role model. Finally, there would be a means of inputting Markdown, either through a text box or through a link suggester to a note to embed.


I’m decent enough at TypeScript to get by, so I may develop the plugin myself if nobody else is interested in creating this, but it will be an uphill battle. Maybe I need the excuse to finally wrap my head around Obsidian’s API.

What do you all think about this plugin concept?