Skip to content

[Feature Request]: Option to hide frontmatter from notes #42

Description

@Itai-Nelken

I'm using markleaf on android and syncing using syncthing to the same folder flatnotes uses for notes. However the problem is that markleaf adds frontmatter which flatnotes renders as a giant heading that makes it annoying to read my notes.
I think the best way to solve this is to add an opt-in option to hide such frontmatter. This shouldn't be too hard to implement, as it would simply be to not render the block of text between --- and --- (including them).

Is anyone else interested in such a feature? and would the maintainers be ok with adding it? If so, I am open to trying to implement it.

Some notes on this:

  • I don't think actually parsing such frontmatter should be an option, as different notes apps use different field names.
  • This could cause an issue with the last updated times not being accurate, hence I'm suggesting it as an opt-in option.
  • Another reason for this option to be opt-in is that some people may use such headings for their own metadata which they would actually like to see.
  • Many android notes apps that I tried use such frontmatter using the same syntax for the block, so this would be useful for other apps as well.
  • Another thing that can be done is to allow specifying the exact frontmatter to remove (maybe as a regex?)

Example of the issue:
Image
Raw markdown of the frontmatter:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions