Re: Tumbeblogging with pyblosxom?

will <[email protected]> Wed, 27 Feb 2008 11:31:13 -0500
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
chombee wrote:
> On Tue, 2008-02-26 at 09:53 -0500, will wrote:
>> PyBlosxom doesn't support Python execution in templates, but PyBlosxom 
>> does have flavour template overriding.  See the chapter on flavour 
>> templates for more details:
>>
>> http://pyblosxom.sourceforge.net/1.4/manual/flavours_and_templates.html#where-to-put-your-flavour-files
>>
>> The piece that's missing is the posting bit.  That shouldn't be too hard 
>> to do, but I know I don't have time to bang something like that out 
>> right now.
> 
> Had a play around with this. It's almost right but not quite. It allows
> you to override flavour templates on a per-category basis so that if the
> user is viewing the links category at pyblosxom.cgi/links/ they will see
> posts with the links flavour, whereas pyblosxom.cgi/quotes/ might use a
> different quotes flavour. But when you're just looking at everything via
> pyblosxom.cgi/ then everything looks the same, the overall flavour
> template applies and none of the category-specific templates apply.
> 
> For a tumbleblog, you need to get posts of different types to be
> formatted differently *on the front page*. Check out
> http://humachine.us/ for example, you can see that text, link, quote,
> img etc. posts have different formatting, on the front page.

I had the link category excluded from the indexes using a filter plugin 
or something built into PyBlosxom--I forget the specifics--so I didn't 
have this problem.


> The other problem is with post titles. With pyblosxom, every entry has a
> title. But if the links category flavour is configured to display
> nothing but a hyperlink and optional text following the link, then a
> title doesn't come into it. But in pyblosxom you would still need to
> give the post a title in the txt file. I think you could get away with
> just leaving the first line of the file blank though, since the title is
> never going to be used it's okay for it to be empty.
 > [snip]

Leaving the title blank should be fine (if it's not, that's probably a 
bug), but it sounds like you really want an entryparser here to handle 
tumbeblog files with a different format.

It sounds like there are enough bits here for a tumbleblog plugin, but 
the plugin shouldn't be too hard to write (I think).  A plugin would be 
able to specify the flavour template used to render with the "template" key.

/will

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/