May 9, 2007
MarkBernstein.org
 
Follow me on Twitter

Let Me Introduce The Host

It recently came to my attention that NetNewsWire treats relative URLs in RSS feeds one way if you have syncing on, and another way entirely if you turn it off.

Ouch. Bottom line: you really want to avoid relative URLs in RSS feeds.

OK. The problem is, some of my Tinderbox projects want relative URLs on my HTML pages, because they're shorter and they're much easier to test. With relative URLs I don't need to upload the page to see if the images are right. So, I want relative urls in the HTML but absolute urls in the RSS version of the same post.

Ouch.

So here's what I'm trying. The export element ^root continues to export a relative path, unless you tell it otherwise. But, whenever you like, you can say

^setRoot(http//example.com/myDirectory/)

and, for the rest of the current page, Tinderbox will assume that ^root is actually the URL you specify.

Comments? Email me. It seems awfully complicated to me, but I don't see an easier way to fix this in Tinderbox. It really should be fixable in RSS: NNW could choose an interpretation, say "here is what we do", and there we'd be.