rhysd / notes-cli

Small markdown note taking CLI app playing nicely with your favorite editor and other CLI tools
MIT License
218 stars 26 forks source link

FR Produce valid metadata yaml #10

Open blaggacao opened 4 years ago

blaggacao commented 4 years ago

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

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

Title 
===

Benefits:

Cons:

Would solve #4

rhysd commented 4 years ago

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.

blaggacao commented 4 years ago

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.