eloc icon indicating copy to clipboard operation
eloc copied to clipboard

Frontmatter support

Open amio opened this issue 5 years ago • 3 comments

A much better way to config.

The only issue is the bundle size. js-yaml costs 171.9 kB, yaml costs 93.1 kB, while the markdown-deck is 93.7 kB now.

Or maybe go with an in-house naive front-matter implementation. It's just a few configurations, won't need full featured yaml parser.

amio avatar Mar 23 '20 17:03 amio

maybe make frontmatter only parse a subset of yaml,

such as only contains string, number and list, and without nested:

title: xxxxxxx
date: 2020-03-24 11:21
tags: [OOXX, XXOO]
categories: 
  - xxxxx
  - sub-xxxx

so that we can minimize the cost to implement a parser

zthxxx avatar Mar 23 '20 17:03 zthxxx

maybe make frontmatter only parse a subset of yaml

Yep, that's the idea. Still wish to find out if someone already done something like this.

amio avatar Mar 23 '20 17:03 amio

Just found js-yaml is a lot smaller since v4.0 image

amio avatar Jan 13 '23 15:01 amio