flavour overhaul for PyBlosxom 1.3
will guaraldi <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi guys!
I checked in a bunch of changes to how flavour templates are handled
today. Specifically:
- PyBlosxom checks flavourdir if it's set OR datadir if flavourdir is
not set.
- PyBlosxom will handle category flavour template overrides in the
flavourdir (i.e. if you have flavour templates in flavourdir/dev,
then we'll look at those before looking in flavourdir if the user
is looking at items in the /dev category).
- I added a "flavours" directory to pyblosxom/PyBlosxom. This
directory will hold all included flavours that come with PyBlosxom.
For now, it holds the flavour templates that I extracted from
pyblosxom/PyBlosxom/renderers/blosxom.py . (i.e. no more hard-coded
templates! yay!)
- I changed calls from tools.Walk to os.listdir when pulling flavour
templates.
- These changes allow site admin to include additional site-wide
flavours.
- These changes allow users to override the error flavour.
- These changes make it possible for us to include more flavours in
a way that doesn't require additional installation steps.
Anyhow, that's what I was trying to accomplish. I did some initial
testing on my local machine (I'm not longer doing development in the same
instance as my actual blog).
The one non-backwards-compatible issue with this is that date_head.html
and date_foot.html are no longer provided if you have your own html
flavour. I tossed around adjusting for this, but I'm thinking I don't
think I'm going to bother.
The one big issue with flavours that we still don't handle is how to deal
with resource content (css files, gif/jpeg/png images, ...). I think I'm
going to whip together a plugin to handle that--more on that later.
Any thoughts, comments, and the like are more than welcome. All changes
are checked into HEAD (where I'm doing development for PyBlosxom 1.3). I
realize I didn't discuss any of these with anybody, but I'm thinking none
of these are radical departures from PyBlosxom's mission and all of them
make installation, configuration, and usage much easier.
/will
p.s. Hopefully, this will become a regular thursday-night/friday PyBlosxom
coding fest.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php