1.0.0 • Published 5 years ago

twing-markdown v1.0.0

Weekly downloads
27
License
BSD-2-Clause
Repository
github
Last release
5 years ago

Twing Markdown

NPM version Build Status Coverage percentage

Implements Marked for Twing using twig {% markdown %} {% endmarkdown %} tags.

NB: Not yet implemented in browser!

Example

Twig:

{# With Filter #}

{{ '# Some markdown here...'|markdown }}

{# With Tag #}

{% markdown %}
  # Some markdown here...
{% endmarkdown %}

HTML:

<h1 id="some-markdown-here-">Some markdown here...</h1>

Usage

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());

Twing

Read the Twing Documentation for more information.

Contributing

  • Fork this repository
  • Code
  • Implement tests using tape
  • Issue a pull request keeping in mind that all pull requests must reference an issue in the issue queue

Thanks To

License

Copyright © 2018 Nathan Kelly. Released under the 2-Clause BSD License.