Status report
It looks as if there’s very little going on here at the moment, but there’s a lot of invisible activity taking place. I want to use mod_rewrite to give me static URLs for each page, so I need to make a few modifications to the site engine. Unfortunately, this isn’t as easy as it sounds. I wrote the code in a day or so, in a frenzy of activity. It is not very beautiful code. It’s documented reasonably well, and I know what is going on, but it is not elegantly written. It uses so many global variables that it is difficult to modify one thing without wider effects. I’ve been going through the code, isolating each function so that it obtains all its required information in the calling statement, and the only variables changed are those passed by reference (in the few cases where that is desirable).
There is a second problem too, which relates to the internationalisation of the site. At present, the name of each section is derived from the directory in which it resides, with ordering achieved by tacking a number on the start (and filtering it out again to display the name). That isn’t going to work for much longer. After a bit of thought, I came up with the solution, which also allows me more versatility in how I organise the directory structure. That is to use a separate text file for each language to map the name of each node to a physical directory. I can use sensible directory names and map the virtual hierarchy as I wish. It even allows the same directory to be mapped to multiple virtual locations, so that (for example) the same software licence can appear under multiple headings. I’m now implementing these new features as I work through the code, which is about 550 lines long at this point.
Nonetheless, I think I’ve done all I can for now, so I’m going to pause here and go to bed. Tiredness has suddenly caught up with me.