Cole recently blogged about how powerful it would be to have a feed2js-like feature tied to the blogs@psu. We also talked about this in the episode of ETS talk we just recorded.
It got me thinking. With Movable Type's templates, there really isn't a need to run a separate service to create an embed javascript based on RSS feeds. Movable Type could just generate a static javascript file each time the blog is updated, just like is does with the rss file, index file, etc.
So, I just whipped up a little proof of concept. Works pretty well, IMHO.
directly below here are the results. Keep in mind, as I produce new posts, they will be listed below:
And here is how I did it:
1) created a new index template and set it to output a file called "feed.js". I called the template "JS Feed", but you can call it whatever you want.
2) Whipped up a little template to create the javascript. This text file has the template body.
3) Now, whenever I add a new entry or rebuild my blog, a file called feed.js in created. I used this code to embed it into this post. I could use this to embed my blog's feed into any page.
That's it. I could easy add this template to the default templates that come with new blogs at blogs@psu. I could also make another template that would auto-generate the embed code. So simple.
Fantastic. Now, take it to the next level and push out a separate opportunity to aggregate the full text of the last x posts -- not just the titles. What would be cool would be to give people the option of post titles or full text.
Yeah. I just posted the same thing over at your blog. ha!
It is pretty trivial to do. No problem.