lastfm-recently-played-readme
lastfm-recently-played-readme copied to clipboard
Display your recent Last.fm scrobbles on your GitHub profile README.
Last.fm Recently Played README
Show your recent Last.fm scrobbles on your GitHub profile README. Powered by Vercel.
Check out spotify-recently-played-readme for a similar integration for Spotify.
Getting Started
Just add the following into your README and set the query parameter user
to your Last.fm username.

Link to Last.fm profile
[](https://www.last.fm/user/JeffreyCA01)
Custom track count
To a custom number of tracks, pass the query parameter count
and set it to the number of tracks to display.
Default:
5
Min:1
Max:10
Example:

Custom card width
To set a custom card width, pass the query parameter width
and set it to the desired width in px.
Default:
400
Min:300
Max:1000
Example:

Show loved tracks
Set the loved
parameter to true
to show a heart indicator next to your loved tracks.
Default:
false
Example:

Further customization:
You can set the loved_style
parameter to 1
, 2
, 3
, or 4
to customize the indicator placement.
Default:
1
Style 1 | Style 2 | Style 3 | Style 4 |
---|---|---|---|
Deploying own Vercel project
Deploy your own Vercel project using the link above. Next, you'll need to set the API_KEY
environment variable to your Last.fm API key. You'll also need to set the VERCEL_URL
system environment variable in the Vercel project settings.
Running locally
- Clone Git repo
$ git clone https://github.com/JeffreyCA/lastfm-recently-played-readme.git
- Install Node dependencies
$ npm install
- Create
.env
file containing the following:API_KEY=<Last.fm API key>
- Run development server
$ npm run dev
The app will be running at http://localhost:3000.
License
MIT