Posted 910 days ago
Whipped out a quick plugin tonight along the lines of optimizing my fold at timfanelli.com. It trims my entries down to 20 words summaries when you're viewing my home page. When you visit my homepage then, you only see the first 2 lines of text for recent entries, and you can follow the title link to view the full story.
When you browse by tags, the ReadMore plugin takes effect showing you potentially more content than you'd see on my home page, but still not the entire story (unless, of course, I neglected to add a <!-- BREAK --> to my post.). The home page summary plugin strips any markup from the summary to prevent bastardizing otherwise valid markup, and also to prevent my other plugins (such as ReadMore) from taking effect.
Home page summaries will be released when I post Blosxonomy 0.6 - but if you're curious to see how it works, here's the method I use to generate an entry's summary:
def generateSummary( body ) # Remove markup from the body body = body.gsub( /<[^>]+>/, '' ) # Split the body into words (consecutive blocks of non-whitespace) words = body.scan( /[^\s]+/ ) # Take the first 20 words words = words.slice( 0, [20, words.length].min ) # Join them back together in a paragraph. return "<p>%s...</p>" % words.join( " " ) end
I use this same method now to generate <atom:description> content in my Atom 1.0 renderer plugin.
Posted 912 days ago
I ported the pyBlosxom trackback plugin this morning, so I now have trackback support re-enabled! Very exciting.
Now that Blosxonomy has comments and trackback support, I'm going to release version 0.5 at Blosxonomy.com
Posted 913 days ago
I implemented a simple comments plugin tonight for Blosxonomy - loosely based on the pyBlosxom comment plugin. pyBlosxom's comment plugin is a little more involved than I was shooting for, as one of Blosxonomy's goals is simplicity. Mine simply checks the post data for a comment, verifies all the information is there, and writes out a comment file with a simple format:
Comment Author Author's email Comment body
The plugin requires the current code base, which I'm going to post over at Blosxonomy sometime tomorrow (I still need to do some sanity checking on it). In the meantime though, feel free to start leaving comments!
Posted 915 days ago
I recently decided it'd be fun to learn the Ruby language, and that a worthy undertaking to do so would be to port pyBlosxom - which I've been using for a little over a year now. The result is something I'm quite proud of, and am still actively working on -- Blosxonomy.
add to
del.icio.us