Add an RSS feed to another HTML page
To add your Blog to your homepage you will use the RSS feed that is automaticly created and updated when you make an entry to your Blog. You will need to add a script that finds this file to your page. Thsi script will create an unordered list of the requested blog entries. Follow the directions below to generate the script URL and add styles to the list.
You can choose to only display the titles of the blog entries and link then back to your blog. Or you can choose to show the titles and a short description of your blog entry with a link back to the blog.
- Display Just the Title of the Blog Entry (example)
- Display the Title and a Description of the Blog Entry (example)
Display Just the Title of the Blog Entry
Note: You must have the enough posts in your blog to be displayed on your HTML Page. For example, If you choose to display your last four posts on your HTML page, you must have at least four posts in your blog.
- The URL you should use in your script should look like this:
http://www.ts.vcu.edu/cgi-bin/cgiwrap/rss.pl?your_blog_name&number_of_entries_to_display
- For example if your blog is http://blog.vcu.edu/tsnews/, and you want to display the last four entries, then your URL will be (notice the & between the blog name and number of entries requested):
http://www.ts.vcu.edu/cgi-bin/cgiwrap/rss.pl?tsnews&4
- Add the script to your page where you would like it to display (see example):
<script language="javascript" src="http://www.ts.vcu.edu/cgi-bin/cgiwrap/rss.pl?tsnews&4" type="text/javascript"></script>
- Check the StyleGuide and add styles to the links.
Display the Title and a Description of the Blog Entry
Note: You must be sure that you description field does not contain Microsoft Word "Character". This will cause the script to break. Copy your entry from Word to Notepad before putting it in your blog to remove these characters.
- The URL you should use in your script should look like this:
http://www.ts.vcu.edu/cgi-bin/cgiwrap/grabrss.pl?your_blog_name&number_of_entries_to_display&length_of_description
- For example if your blog is http://blog.vcu.edu/tsnews/, and you want to display the last four entries, and you want to display a hundred character description, then your URL will be (notice the & between the blog name, number of entries requested, and length of description):
http://www.ts.vcu.edu/cgi-bin/cgiwrap/rss2.pl?tsnews&4&100
- Add the script to your page where you would like it to display (see example):
<script language="javascript" src="http://www.ts.vcu.edu/cgi-bin/cgiwrap/rss2.pl?tsnews&4&100" type="text/javascript"></script>
- Check the StyleGuide and add styles to the links
