Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mjun0812/gatsby-remark-amazon-link
This plugin is replaced markdown's amazon link with beautiful linkcard used Amazon PA API v5 for Gatsby.js.
https://github.com/mjun0812/gatsby-remark-amazon-link
gatsby gatsby-plugin gatsbyjs
Last synced: 14 days ago
JSON representation
This plugin is replaced markdown's amazon link with beautiful linkcard used Amazon PA API v5 for Gatsby.js.
- Host: GitHub
- URL: https://github.com/mjun0812/gatsby-remark-amazon-link
- Owner: mjun0812
- License: mit
- Created: 2023-03-02T08:49:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-06T15:21:17.000Z (over 1 year ago)
- Last Synced: 2024-12-23T19:01:56.440Z (25 days ago)
- Topics: gatsby, gatsby-plugin, gatsbyjs
- Language: JavaScript
- Homepage:
- Size: 237 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gatsby-remark-amazon-link## Features
This plugin is replaced markdown's amazon link with
beautiful linkcard used [Amazon PA API v5](https://webservices.amazon.com/paapi5/documentation/).![linkcard-example](assets/preview.png)
![linkcard-example-dark](assets/preview_dark.png)
## Install
1. Install package.
```bash
npm install --save gatsby-remark-amazon-link
```2. Enable plugin in your `gatsby-config.js`.
```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`.
```js
import 'gatsby-remark-amazon-link/styles/default.css';
```## Usage
Write amazon link on your markdown file!
```markdown
[$amazon](https://amazon.co.jp/dp/B00000000/?xxxxxx)
```## Option
| name | default | description |
| ------------ | -------------- | ----------------------------------------- |
| 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) |
| marketplace | `amazon.co.jp` | Amazon market region. |
| convertTitle | `$amazon` | Replace markdown's link title |### Optional: CSS
If you want to change the design of the linkcard yourself,
please use [this css](./styles/default.css) as a reference.## Reference
[Amazon PA-API v5 doc](https://webservices.amazon.com/paapi5/documentation/)
[gatsby-remark-link-beautify](https://github.com/Talaxy009/gatsby-remark-link-beautify.git)