1.2.2 • Published 9 months ago

gatsby-remark-amazon-link v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Features

This plugin is replaced markdown's amazon link with beautiful linkcard used Amazon PA API v5.

linkcard-example

linkcard-example-dark

Install

  1. Install package.
npm install --save gatsby-remark-amazon-link
  1. Enable plugin in your gatsby-config.js.
resolve: `gatsby-transformer-remark`,
options: {
  plugins: [
    {
      resolve: `gatsby-remark-amazon-link`,
      options: {
        accessKey: "xxxxxxxxxxxx",
        secretKey: "xxxxxxxxxxxx",
        partnerTag: "xxxxxxx-22",
        marketplace: "www.amazon.co.jp",
      }
    }
  ]
};
  1. Load css in your gatsby-browser.js.
import 'gatsby-remark-amazon-link/styles/default.css';

Usage

Write amazon link on your markdown file!

[$amazon](https://amazon.co.jp/dp/B00000000/?xxxxxx)

Option

namedefaultdescription
accessKey(required)Amazon PA-API v5 access key
secretKey(required)Amazon PA-API v5 secret key.
partnerTag(required)Amazon Associate Partner Tag(ex. hoge-22)
marketplaceamazon.co.jpAmazon market region.
convertTitle$amazonReplace markdown's link title

Optional: CSS

If you want to change the design of the linkcard yourself, please use this css as a reference.

Reference

Amazon PA-API v5 doc

gatsby-remark-link-beautify