Project

jekyll_mtg

0.0
No release in over 3 years
A Jekyll plugin for adding Magic: The Gathering links, images, and decklists via custom Liquid tags
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

JekyllMTG

jekyll_mtg is a Jekyll plugin that helps you reference Magic: The Gathering cards in your site content. You can generate links to cards on Scryfall by using a simple Liquid tag.

Installation

Follow the Plugins doc from Jekyll.

Usage

Link a Card

# Link to any version of the named card.
{% link_card name="Obliterate" %}

# Or link to a specific version by including the set code.
{% link_card name="Obliterate" set="INV" %}

# Override the card name as the default contents of the anchor tag.
{% link_card name="Obliterate" set="INV" contents="Obliterate (the one with the good flavor text) %}

If no card is found from the query to Scryfall, whether because the card name is misspelled significantly or the wrong set code is specified or no card with the specified name exists, then the output of the conversion process is the value of contents (if specified) or name.

Coming Soon

  • Embed a card image
  • Render a full deck list

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/MatthewSerre/jekyll_mtg.

License

The gem is available as open source under the terms of the MIT License.