Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips


I would like to use CityDesk to run a weblog. Is there a way to generate a weblog-style archive page, where you have months listed which link to a page including the posts from that specific month?

Adam J. Blust
Wednesday, December 05, 2001

Look at the bottom of this page:

It's a month by month archive of Joel's log.

Joel, how about showing us the script.

Terry Kearns
Wednesday, December 05, 2001

It's not super-automatic. The list is generated:

{$foreach x in (folder "oldnews/pages")$}{$x.headline$}

The folder oldnews/pages contains a bunch of articles named "March 2000", "April 2000", etc.

Each of those looks basically contains this:

{$ foreach newsStory in (and (folder "news")
(and (after 2000/02/28) (before 2000/4/1)))
sortAscendBy .filedDate $}

Once a month I have to clone one of those articles and tweak the date ranges.

Joel Spolsky
Wednesday, December 05, 2001

I think making this sort of thing more automatic will be important if CityDesk is to gain wide acceptance as a weblog tool. You've got a great system here, and with a few tweaks it could make major inroads in the weblog world.

Adam J. Blust
Wednesday, December 05, 2001

Except it would be way too expensive as a weblogging tool. The Home Edition would only last a little more than one year. $349 is probably more than most people would be willing to pay for a weblogging tool, when Radio (well the new version) will be a lot cheaper.

You could of course have one article per month, but that would be uncool and less linkable.

Guan Yang
Thursday, December 06, 2001

> "Except it would be way too expensive as a weblogging tool"

But you may need weblogging capabilities, added to a more classic content management system. and in that case, the price is more justified.

that's why the automatic generation of archive page is an excellent suggestion. Imagine if you produce a site with the need for weekly or daily archive ? impossible to run without automation...

(and if we had some previous/next automation at the same time, it would be the nirvanaaaaaa... but this has been asked about 2475 times in this forum ;)

Vincent Benard
Thursday, December 06, 2001

I can't drag old articles to an Archive folder -- the URL would change, breaking everyone's links. Instead, I'm thinking of keeping everything in one folder and using selective foreach to keep things in order. The main index.html can use foreach to pull in the content of the top few articles. It's hardly Blogger, but it'll do. My main concern is the 500 article limit.

Garth Kidd
Sunday, December 09, 2001

I'm doing selective loops in my archive page, which you see at:

Basically, for each month, I manually enter a title, and then use a month-limited selection like Joel illustrated above. It'll hardly be a bother, since I'll have to update it once a month (and I'm awfully anal-retentive about previewing my site before publishing, so I'll notice missing archive entries).

Brad Wilson
Sunday, December 09, 2001

*  Recent Topics

*  Fog Creek Home