0.1.1 • Published 9 years ago

hexo-mtg-card-jp v0.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

hexo-mtg-card-jp

features

Mark up MTG card name

Mark-up MTG card name in hexo's post. hexoのpost中に書かれたmtgのカードを、任意の形式でマークアップする。

Make IMG tag

Create IMG tag from Nunjucks tag in your post. hexoのポスト中に書かれたNunjucksタグからIMG要素をつくる

This plugin use mtgjson.com .

How to use

Markup

Edit template

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.

Write card name into your post

For example...

《鐘突きのズルゴ/Zurgo Bellstriker(DTK)》

This plugins format that card name.

The example will be translated as...

<span is="mtg_card" mtg_types="creature" mtg_colors="red" mtg_multiverseid="394748">《鐘突きのズルゴ/Zurgo Bellstriker(DTK)》</span>

Create IMG tag

Please write like below in your post.

NOTE: Card set name is needed.

{% mtg_card 《兜砕きのズルゴ/Zurgo Helmsmasher(KTK)》 %}

install

$ npm install hexo-mtg-card-jp --save

And add _config.yml

plugins:
- hexo-mtg-card-jp
0.1.1

9 years ago

0.1.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago