/hexo-tag-snack

This Hexo tag allows you to embed Snack code snippet into your blog post.

Primary LanguageJavaScriptMIT LicenseMIT

npm version

hexo-tag-snack

Plugin for Hexo blog engine which allows you to embed into blog post code from snack.expo.io.

Installation

npm i hexo-tag-snack --save

Usage

{% snack snack-id snack-platform snack-preview %}

Example

Let's assume your embed code looks like the following:

<div data-snack-id="r1WUzhlJW" data-snack-platform="ios" data-snack-preview="true" style="overflow:hidden;background:#fafafa;border:1px solid rgba(0,0,0,.16);border-radius:4px;height:505px;width:100%"></div>

So your tag should look like this:

{% snack r1WUzhlJW ios true %}

License

MIT