Skip to content

naokiy/hexo-mtg-card-jp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published