shd101wyy/markdown-preview-enhanced

Support Frontmatter

klorenz opened this issue · 9 comments

Can you please support frontmatter

Maybe rendered as table or definition list on top of the document.

Cheers!

Hi @klorenz ,

I will have a look.

Thanks

Maybe replace

---
foo: bar
---

with

```yaml
foo: bar
```

Is that okay if I render the yaml as a table?

like this
screen shot 2016-08-12 at 3 29 29 pm

ps: Anything else I need to add? Sorry I have never used front-matter before ;)

If you don't like table, I can also do (which is much easier)

```yaml 
blablabla
```

From my point of view, I think table is not a good idea when there are too many entries. But it seems that gfm is using table to render yaml.

Anyway, both will be supported. I will release a new version that supports front matter this weekend.

Great, ty :)

if a table, I'd prefer

name value
foo bar

BUT: I think the syntax is even better

Done.

screen shot 2016-08-12 at 11 48 40 pm

You can disable rendering as table from the settings.
screen shot 2016-08-12 at 11 48 59 pm

Then it will be rendered as yaml

screen shot 2016-08-12 at 11 49 14 pm

Cheers!

I changed the options so that now you can hide front matter if you want.
screen shot 2016-08-26 at 12 45 48 am