0.01
No commit activity in last 3 years
No release in over 3 years
Liquid tag for display Amazon associate links in Jekyll sites.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
>= 3.0
>= 0
>= 0

Runtime

~> 2.4.0
>= 0
 Project Readme

Jekyll::Amazon

Liquid tag for display Amazon Associate Links in Jekyll sites: {% amazon %}.

Installation

Add this line to your application's Gemfile:

gem 'jekyll-amazon'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-amazon

And set the environment variables required by the Product Advertising API:

$ export ECS_ASSOCIATE_TAG=...
$ export AWS_ACCESS_KEY_ID=...
$ export AWS_SECRET_KEY=...

(ECS_ASSOCIATE_TAG is the Tracking ID for your Affiliate account; AWS_ACCESS_KEY_ID and AWS_SECRET_KEY are your security credentials from your AWS account. An AWS account is required for the use of this API.)

Finally, add the following to your site's _config.yml:

gems:
 - jekyll-amazon

Configuration

Put the configuration in your _config.yml:

jekyll-amazon:
  locale: 'ja'  # label's language. default: 'en'
  country: 'jp' # with the two character country code of their Amazon
                # Affiliate account (e.g. `'us'` for United States).
                # default: 'us'
                # 'br'/'ca'/'cn'/'de'/'es'/'fr'/'in'/'it'/'jp'/'mx/'uk'/'us'
  template_dir: '_templates' # original template directory

Usage

Use the tag as follows in your jekyll pages, posts and collections:

{% amazon 4083210443 detail %}

References

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tokzk/jekyll-amazon.