Mark-up MTG card name in hexo's post. hexoのpost中に書かれたmtgのカードを、任意の形式でマークアップする。
Create IMG tag from Nunjucks tag in your post. hexoのポスト中に書かれたNunjucksタグからIMG要素をつくる
This plugin use mtgjson.com .
Modify plugins/mtg-card-jp/card.ejs
in your theme directory to define format.
For example...
<span is="mtg_card"
<% if (card.types) { %> mtg_types="<%- card.types.join(' ').toLowerCase() %>"<% } -%>
<% if (card.colors) { %> mtg_colors="<%- card.colors.join(' ').toLowerCase() %>"<% } -%>
<% if (card.multiverseid) { %> mtg_multiverseid="<%- card.multiverseid %>"<% } -%>
><%- content %></span>
card.xxx is card data from mtgjson.com ( http://mtgjson.com/ ). content is original card name from your post.
For example...
《鐘突きのズルゴ/Zurgo Bellstriker(DTK)》
The example will be translated as...
<span is="mtg_card" mtg_types="creature" mtg_colors="red" mtg_multiverseid="394748">《鐘突きのズルゴ/Zurgo Bellstriker(DTK)》</span>
Please write like below in your post.
NOTE: Card set name is needed.
{% mtg_card 《兜砕きのズルゴ/Zurgo Helmsmasher(KTK)》 %}
$ npm install hexo-mtg-card-jp --save
And add _config.yml
plugins:
- hexo-mtg-card-jp