alfredbaudisch / pardall_markdown

Reactive publishing framework, filesystem-based with support for Markdown, nested hierarchies, and instant content rebuilding. Written in Elixir.
Apache License 2.0
115 stars 7 forks source link

Add a YAML FrontMatter metadata parser #41

Open alfredbaudisch opened 3 years ago

alfredbaudisch commented 3 years ago

Proposed Solution

  1. Parse YAML to Elixir, getting an Elixir map from the YAML FrontMatter string.
  2. Then, feed the resulting elixir map to the current ElixirMap parser, this way, there's no need to worry about the low level details

As an example, the JoplinNote parser also uses the ElixirMap parser. This way you don't need to worry about the inner details of what the YAML data contains, the validation is all done by ElixirMap and FileParser anyway.

Example markdown file

---
title: Elixir!
---

Content...
alfredbaudisch commented 2 years ago

@rockchalkwushock Wanna tackle this one? I added the steps to the issue.

rockchalkwushock commented 2 years ago

@alfredbaudisch yep I think I can tackle this pretty easily. I will review it more this afternoon and if I have any questions post them here.