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 support for custom Parsers of Markdown metadata/attributes (for YAML, Joplin, etc); Make the current Elixir Map parser one of the parser options #30

Closed alfredbaudisch closed 3 years ago

alfredbaudisch commented 3 years ago

Make it similar to dashbitco/nimble_publisher#16 (thank you @dkuku).


Original issue was focused on a single new parser for YAML: For better compatibility with posts from other static website builders.

dkuku commented 3 years ago

I've recently pushed a pr to nimble publisher to have an option for custom parser-do you think this can be done in a way thats compatible between the packages as a hex dependency? https://github.com/dashbitco/nimble_publisher/pull/16

alfredbaudisch commented 3 years ago

I liked your idea and the approach to dealing with the parsers. Having it as a hex dependency can be useful for PardallMarkdown, so I don't have to re-invent the wheel.

dkuku commented 3 years ago

The Code.eval_string trick may be good if you keep the data inside your app as nimble publisher does. But when you want to allow parsing external folders possibly modified by others it's a security threat.

alfredbaudisch commented 3 years ago

I've recently pushed a pr to nimble publisher to have an option for custom parser-do you think this can be done in a way thats compatible between the packages as a hex dependency? dashbitco/nimble_publisher#16

@dkuku implemented as per your idea, thank you (a30a748)