Tuesday, 3 January 2012

Embedding Blog Posts on your Web Pages

Recently I spent some time looking at how to embed a list of blog posts obtained via a feed URL into a static web page. I wanted to do this so that I could create a static landing page for my business which included not only an overview of the services offered, but also links into some regularly updated content from multiple sources.

A search on Google took me to a couple of interesting possibilities, but most of the links were out of date, there was one which hinted at a gadget (supplied by Google unsurprisingly) but that didn't lead anywhere, and others who had tried it had similar problems.

I also found a third party web site which would create the necessary Javascript and host it for you - you simply have to link the script in from your web page. However, this wasn't really what I wanted - you have to register on the site, whereas I was looking for code, in order to experiment and extend.

Finally I found the article Displaying RSS feeds easily using Google Ajax Feed API on the JavaScript Kit web site. This article covers the following:

  • Introduction to the Google Ajax Feed API
  • Detailed look at the underlying functions
  • General purpose script for displaying feeds

This proved to be exactly what I was looking for, and being a code solution rather than a third party service, there's scope to customise as required.

No comments:

Post a Comment