hexo plugin to display mtg cards
2023-02-24
development
I love Magic the Gathering (mtg) and the cards from it, especially the artworts.
Building decks to play with, is one of the most enjoying parts of it for me, and of course sharing them with others ;)
Hexo itself does not have an “easy, small and fast” plugin to display cards in a post, so i did one myself.
with this script you could:
- display a single card
- display name of the card with tooltip of the image
- show a decklist
it gathers its informations from the scryfall api.
just add a scripts folder in hexo root and add the script of the gist and use the following tags
Github
gist @ github: https://gist.github.com/cybeaer/55415ab742a2766364a52435a8859c3d
Source
mtg card tag syntax:
1 | {% mtgcard "cardname" [edition] [tooltip] %} |
mtg card list syntax:
1 | {% mtglist [tooltip:true,false] [symbols:true,false] %} |
Examples
1 | {% mtgcard "Black Lotus" "leb"%} |
The card Black Lotus is worth much money
1 | {% mtglist tooltip:true download:true symbols:true %} |
Deck (3)
Sideboard (22)
#js #hexo #mtg #development