Display front-matter on hover preview

Now that the front-matter is such a big tool, I reckon it may be a good idea to allow the user to select to show/hide meta data when previewing the note content.

The rationale is: We are now adding more & more detailed front matter in our notes which means in some cases they are more than just little details about the note.

I believe this mean we’d like to see them when previewing the note; or at least have the option to do that with a selector.

Settings → Editor → Show frontmatter.

I usually leave it set to enabled while developing stuff, and possibly turn off later:

It’s a rather helpful setting, I agree with you. And it even has YAML syntax highlighting. :+1:

(And now, everybody will come and check if the beavers and the stork are still there, hee hee … If you do, pay me a visit and you’re in for a talk and a coffee.)

1 Like

But it does not enable display on “hover” preview. This (when viewing and note and hovering on a link) preview only displays body content of the note, not the front matter.

Am I wrong?

No, you’re correct. It will make the frontmatter show up in normal preview, but not on “hover preview”. (Which I quite like, in order not to confuse my or any users.)

Seems I misunderstood you re hover preview, sorry.

If you really want that: You could probably style it using a CSS snippet:

.markdown-embed-content pre.frontmatter.language-yaml {
    display: block;
}

Specificity is rather high, so you might get around without using !important.

Is that what you were out for?

5 Likes

Yes. Except I suggested an option to turn it on/off just like the other " show front matter" setting.

Well, if you make it a CSS snippet, you can always switch it on and off. :slight_smile:

Auswahl_082

6 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.