Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

including an excerpt from an article body?

for an RSS feed, is there any simple way to extract the first X lines/chars/bytes/whatever from the article's Body?

vinod v
Wednesday, January 28, 2004

I use the teaser field to contain the text for the rss feed and pages that list all of the articles.  That way I can control where it stops.

I don't know of any way to generate it from the body.

Lou Franco
Wednesday, January 28, 2004

yep... the problem with the teaser approach is that it's extra work at authoring time on the human.... was hoping there'd be a machine way to do this...

vinod v
Thursday, January 29, 2004

Should be easy to do using Javascript

David Watts
Sunday, February 01, 2004

re: javascript.  Well, I don't think so.  RSS is an xml file that gets read by a newsreader.  javascript is (normally) a client browser scripting language.  So, normally, the rss feed will never see javascript.

You may be able to do some fooling with the rss feed during the CD publish cycle. You can invoke a script before the files are ftp-ed to your host.  In that script you might grab some of your full text and copy it to where your summary tag information goes.

joel goldstick
Sunday, February 01, 2004

*  Recent Topics

*  Fog Creek Home