notes-cli icon indicating copy to clipboard operation
notes-cli copied to clipboard

FR Produce valid metadata yaml

Open blaggacao opened this issue 4 years ago • 2 comments

There might be a better alternative to the current DSL for the metadata

---
Categories:
 - foo
Tags:
 - bar
Created: ...
---

Title 
===

Benefits:

  • metadata is always good
    • eg. render a html static page with all notes classified according to metadata (like a blog post with tags and categories)

Cons:

  • (simple) migration needed

Would solve #4

blaggacao avatar May 14 '20 16:05 blaggacao

I avoided YAML front matter because it is not a part of markdown (see commonmark spec to know the spec of markdown). It's original extension of some markdown implementation. Some markdown parser does not implement it.

rhysd avatar May 15 '20 01:05 rhysd

I understand and agree, on the other hand, this is still completely valid markdown:

---          (horizontal rule)
Categories:  (normal word)
 - foo       (bullet point list)
Tags:        (normal word)
 - bar       (bullet point list)
Created: ... (normal word)
---          (horizontal rule)

So maybe even by the measures of the spec compliance, this is just an alternative way to store metadata which happens to also be parseable form a (quite) wide variety of markdown enhancing tools.

blaggacao avatar May 15 '20 02:05 blaggacao