Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aritheelk/gatsby-remark-embed-spotify
Gatsby remark plugin for embedding Spotify songs, albums, playlists, or artist pages.
https://github.com/aritheelk/gatsby-remark-embed-spotify
Last synced: about 2 months ago
JSON representation
Gatsby remark plugin for embedding Spotify songs, albums, playlists, or artist pages.
- Host: GitHub
- URL: https://github.com/aritheelk/gatsby-remark-embed-spotify
- Owner: AriTheElk
- License: mit
- Created: 2018-09-12T17:36:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-01T18:18:32.000Z (about 5 years ago)
- Last Synced: 2024-09-21T12:56:06.222Z (3 months ago)
- Language: JavaScript
- Homepage: https://words.garet.io/music-for-programming/
- Size: 24.4 KB
- Stars: 14
- Watchers: 3
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
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/)
## 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 postThis 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.
## 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