Closed clsource closed 1 month ago
@clsource I'm assuming youtube
is a custom tag you'd implement yourself?
@leandrocp
Yes I created a simple Lib to get the same functionality of dev.to markdown editor in my own website
Nice. Support to manipulate the markdown AST is something I'm still woking on, which would enable you to transform liquid tags into html using https://hex.pm/packages/solid or whatever engine you want
Hey @clsource AST manipulation is now available on the main branch (will be released soon) and I just added an example on how to render Liquid tags: https://github.com/leandrocp/mdex/blob/main/examples/liquid.exs
That script outputs:
<h1><a href="https://shopify.github.io/liquid/">Liquid</a> Example</h1>
<p>Elixir</p>
I've not added a custom tag in the example but implementing {% youtube JNWPsaO4PNM %}
should work as well so I'm closing this issue now but feel free to send more comments. Thanks!
In the https://dev.to website they use special tags in Markdown documents to embed posts, gist, github repos, twitch streams, youtube, and other sites too.
I have been using a custom parser to enable this functionality while migrating my content from dev.to to my own server.
Example
would render