If you want to know when new articles go
online,
subscribe to the WebWord.com
Usability Newsletter!
Greymatter,
RSS, and Syndication
by John
S. Rhodes
Summary
Greymatter is an
excellent web content management system. After you install it, you can begin
to syndicate your content using XML. This article gives you an explicit
step-by-step overview of how I created RSS 1.0 and RSS 0.92 files using
Greymatter. It is assumed that you have some knowledge of HTML and XML, and
that you have already installed Greymatter. Many examples and references are
provided to help you along the way.
Install Greymatter and Fall in Love
If you update your
web site every day, like I do, then you know how painful it is to modify
HTML and then upload it to a server using an FTP program. By painful, I mean
tedious. It is easy to get sick and tired of maintaining a web site when you
need to touch it each and every day. I wrote an article
about this about two months ago. It is especially tedious when you just want
to write articles and interviews, or if you just want to add a few links
here and there. If you run a weblog, you know that it sucks.
Fortunately, there
are tools, services, and code to help people. Here is a big list
of weblog tools. Given my requirements, Greymatter
is the perfect choice. I love Greymatter. It is the best set of Perl
scripts I have ever had to work with: installation is very reasonable, the
web interface is easy to understand, the support forum (run by volunteers)
is great, and it is free. Greymatter rocks, it is that simple. I can't say
enough good things about it.
If you need help
installing Greymatter, read
the manual or visit the discussion
board.
Background Information
Greymatter uses a
variety of template
variables. These variables hold dynamic information and can be used in a
variety of ways. In many ways, the magic of Greymatter is a result of these
variables.
I figured that
since Greymatter used template variables, there would be a way to publish
information to multiple sources. In fact, this is exactly what happens when
I post information: It is pushed to both the WebWord
home page and the WebWord Weblog
Archive. So, the same information can be in two places at once. Magic!
I figured that if a variable was holding data and showing up in two places,
then I could publish it in yet another place. This "other place" would be an XML
file. By creating an XML with these template variables, the magic
would happen again. Each time I update WebWord, the home page, the weblog
archive, and the XML file would be updated.
At this point I
was excited because I realized I could theoretically build an XML file and
update it automatically via Greymatter. However, since I am not a
programmer, I started to get worried. I decided to hit the Greymatter forum
to see if I could find some clues. I'm happy to say that I
hit pay dirt! Other people were interested in syndicating their content.
That meant that they were also interested in generating XML files. It
specifically meant that they were talking about generating Rich
Site Summary (RSS) files, which are just another type of XML file.
The most important
link in the discussion forum was this
one. However, it didn't make sense at first. Although I know a few things
about XML and RSS, this blew me away. So, I first read everything I could find.
When I
finally jumped into the deep end and made it happen my friends in the
Greymatter forum were very helpful. Below you will see
the fruits of my labor. I have developed step-by-step instructions on how to
generate an RSS 0.92 and RSS 1.0 file for syndication. I've added some other
information on validating your files, viewing them after they are retrieved
by a server, and syndication.
How I Did It
Here is how I
literally set up WebWord so that I could create RSS files and syndicate my
content. I tried to drop a ton of clues. Good luck!
0. I didn't back up everything, but I should have. If I were doing
this all over again, I would back everything up. This process isn't perfect
and you might break something. Be prepared! I make no guarantees; this is
just a roadmap.
1. I read this
article about three times because it was written in plain English and it
gave me some confidence. It should help you to mentally prepare. It also
includes many of the important links and gives you a glimpse of what will
happen. (Thanks Derek!)
2. Then I went to this
page copied the code into Notepad. (Note: If you want to see my version
of the code, download
this text file.) I made the changes to the template following the
instructions at the bottom of the page (i.e., I changed the text as
suggested, saved the file as "syndicated10.xml" to my hard drive,
uploaded the file using FTP, and changed the file permissions). By doing
this, I created my first XML file! I created an RSS 1.0 version of WebWord.
Too cool. (Thanks Ross!)
3. I decided that
I needed to create an RSS 0.92 file before moving on, so I opened this page and then
saved the file to my hard drive. I did not change the name of the, I simply
went to the page and saved it to my hard drive. I then opened the file in WordPad and made the same kind
of edits that I made to the RSS 1.0 file. I then saved the file as
"syndicated92.xml" to my hard drive. I uploaded it using FTP and
changed the file permissions.
4. At this point I
took a second to reflect on what I did. By following the instructions and
making the appropriate modifications to some files, I had two XML files on
my web server. These XML files would be my templates that would dynamically
accept changes being made to WebWord. If you take a look again at the RSS
0.92 template on bad-seed.org , you will see several Greymatter template
variables, such as {{logwebpath}}, {{weekday}}, and
{{previousentrysubject}}. As I said above, these variables make the magic
happen. (Thanks again, Ross!)
5.
One good thing about Internet Explorer is that you can easily view XML
files. I decided to see how my two RSS files looked so I directed my browser
(Internet Explorer 5.0 on Windows 98) to the files. If you are curious, here
is the current RSS 1.0 file
and here is the RSS 0.92 file.
You will basically see what I saw. For example, the RSS 0.92 file should
look something like this in Internet Explorer:

This is what I saw
in my browser.
6. Next, after
seeing my files in my browser, I decided to validate them. The reason you
validate your XML is to make sure that it is well formed. Unlike HTML, which
can be pretty sloppy, XML must be structured very well or it cannot be used.
So, I decided to use UserLand's Validator.
I simply dropped my URLs into the validator and checked them out. For some
reason, they did not validate the first time I tried, but about 10 minutes
later,
they both validated. Excellent! (Thanks, Dave!)
7. According to
one of the comments
posted on Derek Powazek's article, I needed to next go to Greymatter and
make a small configuration change. Following the instructions, I went to the
Configuration page, and I scrolled down to Connect Other Files
(Advanced Users Only). I then entered the path to my
"syndication92.xml" file and I clicked the "yes" on the
radio button right below that box. This took a few tries, but I did finally
get it. At this point, I also decided to Rebuild all of my files, just
because it seemed like the right thing to do. The images below should help
you figure this step out.

Click on Configuration

Go to Connect Other Files, enter the path to your RSS file, click Yes
8. I decided to
take my new RSS files for spin. Specifically, I registered my RSS 0.92 file at
UserLand's RSS Aggregator
site. The reason I did this was to test a theory. If Greymatter was
working correctly, it should update my RSS files, and I should be able to
see the changes after I posted news. Further, I should be able to see my
content on another web site after it sucked in my RSS file. So, I posted
some news and checked my RSS files. I'm happy to say that Greymatter updated
them. Then I waited a few hours. I saw that version of my RSS 0.92 file being
displayed on my own RSS
channel at UserLand. This proved that my RSS 0.92 file was being read by
UserLand's aggregator and that my content was available to the world via
XML. Incredible! (Thanks again, Dave!)
9. I built a
simple page that gives people some generic instructions on how they should use
my RSS files. I based my syndication page on what I found
at Tomalak's Realm (i.e., I stole the page and only made minor
modifications). (Thanks, Lawrence!)
Learn More
The only reason
that all of this was possible was because other people are so generous.
Noah Grey for building Greymatter, Dave Winer for being an RSS champion and
providing helpful tools, and all of the people posting comments and
suggestions on the Greymatter discussion board. I'm confident that if I can
get Greymatter to produce XML files, you can do it.
If you want to learn more about XML
and RSS, you should visit these pages:
Final Notes
(1) Please feel
free to send me links to other
important RSS resources and tutorials. I'll add them to the list
above. Even if you don't use Greymatter, the list could grow and be even
more useful.
(2) I would like
to create a list of news aggregation services here. Send
me links to web sites that aggregate RSS newsfeeds. Please be very
specific. I want to point people to the exact page where you would submit
your newsfeed. I don't want to make people hunt around web sites. (I can
only find a few news aggregation services. Strange!) I'll get you
started:
(3) If you enjoyed
this article, and you are in the right mood, buy something from my
Amazon Wish list.
Better yet, go to Noah
Grey's Amazon Wish list
and buy him something!
(4) Check out the Graymatter Support Webring!
<
GM Support
>
?
#
What next?
|