Note's meta data

As of Osbsidian treat every MD file as the note entity than using some sort of database. It leads to the lack of meta structures to be bound to a note.

I suggest the app to parse the <!-- meta_json_object --> block at the first line of MD file to treat it as meta info for the name.

It can add up more “option” to a note while maintaining the core benefit of using a physical text file as a note.

Eg:

    <!--
    {
        'theme': 'theme-name-or-rel-path-to-css-file',
        'tags': ['tag1', 'tag2'], // of course, tag still can be freely added anywhere in the note, but still, imo, it's better to have a fixed structure
        'graph': {
            'title': 'Special title when see in Graph view', // I have issue with the same Note name in different folder
            'color': '#ff0000', // node background color to show in Graph view
            'weight': 'auto', // or some sort of number for the size of the node
            'hidden': true // sample option for not showing this note in graph...
        }
    }
    -->

Then, the Editor can have a panel for config this meta.
The possibility will be endless.

Thanks for the great app.
Minh

6 Likes

MultiMarkdown officially supports YAML Frontmatter, which allows for both standardised and custom fields. This is the solution that is used by some online blogs that take markdown input for articles, as well as what is used by static site generators like Hugo and Jekyll. If we’re going to add metadata visibly to notes, then perhaps this somewhat ‘standard’ solution might be worth considering.

3 Likes

I believe this is also supported in Pandoc, which is another large player in the Markdown space, though I think they call it yaml_metadata_block. I thought that PrinceXML supported it, but on further research, I was wrong.

In any case, I support YAML Frontmatter for the purely selfish reason that it’d be similar to my Hugo blog’s format and usage.

If this were available, I would also make use of it for data-driven documents & projects, especially game design.

1 Like

Related https://forum.obsidian.md/t/metadata-standard/802

we have YAML now.