{{ template "_internal/google_analytics_async.html" . }} Fork me on GitHub

Last.fm Hugo Demo
Ryan Kes
Design inspired by Snap TightImage Tiles snippet
See blog post for more information

{{ $dataJ := getJSON (printf "https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=%s&api_key=%s&format=json&limit=%s" .Site.Params.username .Site.Params.apikey (.Site.Params.limit) ) }} {{ range $dataJ.recenttracks.track }}

{{ printf "%s - %s" (index .artist "#text") .name }}
-
{{ if isset .date "#text" }}{{ index .date "#text" }}{{ else }}Now playing...{{ end }}

{{ end }}