I was looking into how one can make use of oEmbeds within hugo. It did work using some Javascript plus a server-side component that would do the actual oembed resolution. I dropped the idea again though, mostly because I didn’t like the way oembeds of random sites in my posts would look different, how my visitor’s privacy would be given away, and how it would require sideloading all kinds of creepy javascript and css files.

Currently, I’m instead using a scraper library 1 to retrieve metadata from the linked pages on hugo-build-time, and use the resolved opengraph, twitter-card, or generic metadata to generate my own custom styled embed widget. This approach doesn’t require any client side magic and everything happens in a privacy-friendly manner when this site is generated.