Liquid tag for display Amazon Associate Links in Jekyll sites.
Ruby HTML CSS Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_sass Fix style Sep 28, 2016
bin initial version Apr 8, 2016
lib Update 0.3.0 Jan 13, 2017
locales rubocop Jul 27, 2016
spec Refactor Jan 12, 2017
templates Use ERB file instead of string interpolation Jan 12, 2017
.gitignore Check parameters Apr 11, 2016
.rspec Fix specs Apr 12, 2016
.travis.yml Fix specs Apr 12, 2016
Gemfile Restructure lib Apr 8, 2016
README.md Add support for original erb templates Jan 13, 2017
Rakefile Fix specs Apr 12, 2016
jekyll-amazon.gemspec Add locales Jul 27, 2016

README.md

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.