19 hours ago · Tech · 0 comments

For a year or so, this site has been using RSS2HTML↗ to pull in items from an external feed (specifically my Linkding instance↗) so they could be displayed on the sidebar (and the dedicated /bookmarks and /postroll pages). This approach uses client-side JavaScript in combination with a proxy server to retrieve the feeds, parse the items, and render them in the page. That has worked okay but can sometimes (often?) cause page loading to hang while waiting for the JavaScript to complete. Plus, no one likes unnecessary1 JavaScript. So I switched to using Hugo's built-in resources.GetRemote↗2 and transform.Unmarshal↗ functions to do the same thing. This approach won't be quite as "dynamic" since the feeds will be fetched at build time rather than on page load, but I've already set up a deployment pipeline3 to build and deploy the site daily. resources.GetRemote accepts the URL to fetch as an argument (I'm using the RSS feed URL for public Linkding items tagged with #bookmarks), and then…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.