Implements Marked for Twing using twig {% markdown %} {% endmarkdown %}
tags.
NB: Not yet implemented in browser!
Twig:
{# With Filter #}
{{ '# Some markdown here...'|markdown }}
{# With Tag #}
{% markdown %}
# Some markdown here...
{% endmarkdown %}
HTML:
<h1 id="some-markdown-here-">Some markdown here...</h1>
import { TwingLoaderFilesystem, TwingEnvironment } from "twing";
import { TwingExtensionMarkdown } from "twing-markdown";
const loader = new TwingLoaderFilesystem('/path/to/templates');
const twing = new TwingEnvironment(loader);
twing.addExtension(new TwingExtensionMarkdown());
Read the Twing Documentation for more information.
Copyright © 2018 Nathan Kelly. Released under the 2-Clause BSD License.