A small bash-powered weblog engine

July 26, 2007

0.3.6 Progress

Okay, I've had three or four testers banging away on a pre-release version of 0.3.6 and I'll probably post up the new tarball by tomorrow. I've been going back through emails from the past couple of weeks compiling lists for the CHANGELOG and to update the CREDITS and I figured I'd go ahead and list off some of the new additions and changes.

Templates are now fully used exposed This is going to be helpful in a couple of ways. First, I'm going to have available for download multiple flavors of templates. By default, the new template will be HTML5, as per what I've gleaned from the WHATWG.

If you'd rather have the XHTML stuff, there will also be XHTML 1.0 Transitional and XHTML 1.1 template sets available for download. If you use XHTML 1.0 Transitional, you can still send webpages out as "text/html", but if you choose to use the XHTML 1.1 templates, you need to add AddType application/xhtml+xml .html to the .htaccess file in your ROOTDIR. If you don't have an .htaccess file in your ROOTDIR, make one, add that little line of code and you should be set. As long as you make sure you close all of your tags and escape your entities, bashblogger should do the right thing.

If you'd rather have vanilla HTML, there will also be an HTML 4.01 template set available for download. The only reason I'm going to offer HTML 4.01 templates is because there isn't currently a good HTML5 validator and I know how people like putting "(x)html version valid", I know because I used to like doing it. It's a good feeling when you get the code to come out right.

As far as I can tell, and from what little experience I've had with XHTML, there's a lot of work to get it to come out right and there's very little benefit once you do. Semantic markup? You can do that with HTML. Separating presentation from markup? You can do that with HTML. Internet Explorer variants still maintains the largest market share and even IE7 XHTML rendering (with the correct Doctype served) sucks. So, if you want to stick with XHTML, go for it. I'll write templates for it. I think the way forward is most probably going to be HTML5 though.

Where was I, oh yeah, secondly, fully exposed user templates will allow you to add all of the stuff to your site that I don't really care about without you having to muck through the bblog script. What to add FOAF, XFN or one of the many annoying social bookmarking site links to your site. Knock yourself out, the (x)html guts are in $CONF_DIR/templates.

This Web 2.0 shit is fucking ridiculous

The Welcome message crap is gone Mario had pointed out last year that there was a lot of code in the welcome message crap and it could be replaced if the user could just pick an article they've already written and make it "sticky". I thought it was a brilliant idea, so, the welcome message stuff is all gone. Instead, if you want to leave something you've already written stuck to the top of the front page, you can now just make it "sticky" through a couple of new options in the Article Manager, "Make article sticky" and "Make article unsticky".

I think it's pretty self-explanatory, but if you can't figure it out, I think I'm going to finally break down and write some documentation, so, wait for that if you're still confused.

Spell checker built in Kevin Foote submitted a patch to add a spell checker. It uses aspell by default, but can be substituted with ispell if you prefer. This added a new option to $HOME/.bblog.conf called SPELLCHECKER. The default points to /usr/bin/aspell, you'll want to update it to wherever aspell (or ispell if you prefer) lives on your system.

Stand-alone pages re-worked The stand-alone pages has been re-worked to behave more like the article functions. Most of the changes were under-the-hood stuff, so you might not notice much difference except for the fact that the page titles work right every time now and it no longer eats portions of your page.

Rebuildlinks() re-worked One of the problems with the pages so far, since the return to relative links throughout, was that the URLs on the linkbar was consistently FUBARed. After many tedious conditionals, the URLs are all correct now and it doesn't screw up the search box or some of the other nice add-ons. The rebuildlinks() function still doesn't have all of the (x)html stripped out of it and the tedious conditionals was a contributing factor to that. If I get some time to work through it today, I might be able to strip the remaining (x)html fragments out, but I'm tempted just to leave well enough alone.

importRSS() function improvements Kevin Foote has been busy with the pre-release. In addition to the spellchecker patch, he's also submitted numerous cosemetic fixes and wrote a better statement to pull the RSS_URL out of an imported RSS feed. ImportRSS is central to updating to newer versions of bashblogger and easily getting your content out of the old system and into the new system. So, in the future, when your importing your old site into the newer versions of bashblogger, you can thank Kevin for making the whole process work better.

rebuildsite() now works from the commandline Douglas Hunley suggested a commanline flag be added so that bashblogger could be supplemented from various extra scripts he'd written to automagically add content to his own site. After I got though kicking my own ass for not realizing that this should have been in there already, I added the couple of lines of code to add the ability to rebuild your site from the commandline.

Ping update notification services I'd always got around notifying Technorati by keeping a link to Pingoat that automatically "pinged" technoarati and a bunch of other sites. I'd always meant to build "pinging" update notification servers into bashblogger, but never got around to it. Well, it's in there now and it uses curl.

There's a list of servers in update_services located in $CONF_DIR. You can enable pinging the servers listed by uncommenting them. If there are servers not listed you want to ping, find the XML-RPC url provided by the service and add it to the list. Alternatively, if you don't believe in all of that crap, just leave everything commented out and do everything else like normal and it won't affect you.

Pingbacks I'd originally wanted to code in Trackbacks, but that was before I learned that trackback autodiscovery is brain dead. As far as I can tell, there isn't a consistent trackback autodiscovery mechanisim across the numerous blogging platforms. In order to support trackback autodiscovery, you have to download an entire webpage and grep for "trackback". Some pages include a link with rel="trackback", some just include a line of text and some embed it in RDF wrapped in an HTML comment. So, I decided to use pingbacks instead.

Pingbacks were developed by Ian Hixie to overcome the limitations of trackbacks. These limitations include a lack of autodiscovery and the rampant abuse of trackbacks by spammers. Pingbacks use XML-RPC and have been implemented in bashblogger, much link ping updates, through curl. You don't have to do anything special to take advantage of pingbacks, just write and link to other sites like normal. Bashblogger will parse the links in your story and check the other sites to see if they're pingback-enabled. If they are, bashblogger will send an XML-RPC call to notify the site we've linked to and return the control of the shell back to bashblogger.

I've tested pingbacks on several Wordpress blogs and on Hixies Dummy-Blog and it works everywhere so far. If you have any problems with it, drop me a line with the site you were having problems with and I'll see if I can figure out the problem.

That's pretty much the state of affairs for 0.3.6. I have another feature in the works, but I don't think I'll have it wrapped up by tomorrow so I won't talk about it now. Barring any more snafus with the current code, I hope you enjoy bashblogger 0.3.6.