The whole embed reconstructs from one string in the URL
The entire embed rebuilds from one string in a share link.
Hugo ships shortcodes for YouTube, Vimeo, X, Instagram and gists. Not Spotify. So an embed is either raw HTML or something I write.
I spent a while trying to move a copied iframe around before noticing that the entire thing reconstructs from one string:
open.spotify.com/album/6mnGRO87UFiKOoHL3BezZ7?si=abc123
^type ^------- the id -------^ ^tracking
That ?si= is share-tracking. It isn’t part of the address and it doesn’t
belong in a published page.
Everything else — the width, the allow list, the frame border — is boilerplate I can generate. So:
The argument for the shortcode only really shows up on the second embed.
Spotify’s copied markup hardcodes border-radius:12px and a fixed height, so
paste two and they disagree with each other and with the theme. A shortcode
picks the height from the type — 352 for a track, 452 for an album — and the
styling stays in one file where I can change my mind about it once.