# gatsby-remark-embed-spotify

> Gatsby Remark Plugin for Embedding Spotify Songs, Albums, Playlists, or Artist Pages.

Latest version **2.1.1** (published 2019-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-remark-embed-spotify
pnpm add gatsby-remark-embed-spotify
yarn add gatsby-remark-embed-spotify
bun add gatsby-remark-embed-spotify
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2019-11-01 |
| First published | 2018-09-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Garet McKInley |
| Maintainers | garetmckinley |
| Keywords | gatsby, gatsby-plugin, remark, spotify |

## Links

- npm: https://www.npmjs.com/package/gatsby-remark-embed-spotify
- Repository: https://github.com/garetmckinley/gatsby-remark-embed-spotify
- npm.io page: https://npm.io/package/gatsby-remark-embed-spotify

## Dependencies (2)

- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.26.0
- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^1.1.3

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 2.1.1 (latest) — 2019-11-01
- 2.1.0 — 2019-10-27
- 2.0.2 — 2018-09-12
- 2.0.1 — 2018-09-12
- 2.0.0 — 2018-09-12

## README

# gatsby-remark-embed-spotify

Embed Spotify songs, playlists, sets, and artist pages in your markdown files!

### [View a live demo here](https://words.garet.io/music-for-programming/)

<a href="https://www.buymeacoffee.com/gm" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>

## Install

1. Install plugin to your site:

```bash
yarn add gatsby-remark-embed-spotify
```

2. Add `gatsby-remark-embed-spotify` to your `gatsby-transformer-remark` plugins in `gatsby-config.js`:

```js
plugins: [
  {
    resolve: "gatsby-transformer-remark",
    options: {
      plugins: ["gatsby-remark-embed-spotify"]
    }
  }
];
```

3. Restart gastby.

## Usage

```markdown
## My blog post

This is an example of embedding a single spotify track.
Just type your markdown as you normally do, and then insert a valid
spotify link anywhere to automatically transform it into an embed!

https://open.spotify.com/track/6CnkGSMarTBjIKWuuGXBNl?si=ecMRoa36RnWte3RR7PdJhw

You can also embed albums

https://open.spotify.com/album/3ICWz0kXRrh74cfcS0diek?si=AEK51ar4RI6zNduAVMmI-Q

And playlists!

https://open.spotify.com/user/garetmckinley/playlist/2SmGA6PDALbMzfBwseeDNx?si=CDGId95KQHis8uYipbXLzQ

And artist pages!

https://open.spotify.com/artist/0nLTVC5FExtXgF3RoLh0TH?si=SIPTIBZHTaiODE_WNqB-BA
```

> __NOTE:__ Make sure to copy the link instead of embed code or Spotify URI.

<p align="center"><img src="https://i.imgur.com/eqx9bHa.png" alt="screenshot for share > copy artist link" /></p>

## Configuration

```js
plugins: [
  {
    resolve: "gatsby-transformer-remark",
    options: {
      plugins: [
        {
          resolve: "gatsby-remark-embed-spotify",
          options: {
            width: 800, // default is "100%"
            height: 600 // default is 400
          }
        }
      ]
    }
  }
];
```

## License

MIT

---
_Source: https://npm.io/package/gatsby-remark-embed-spotify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
