Problems with static rendering and flavors?

John Sullivan <john-/[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
I decided to move to static rendering for my pages, for a variety of
reasons. One of those is indexing/searching. I don't have Java access
on my host, so I can't use the lucene plugin. Instead, I set up
ht://Dig. It wouldn't follow the links on my dynamically rendered
pages right, and instead of trying to figure out why that was, I
decided to try out static rendering. 

I hope to write a plugin to make easy use of ht://Dig. But, for now,
I'm playing dirty. ht://Dig uses a header.html and footer.html of its
own to display its results. I would like that header and footer to
match the rest of my site, and I would like not to have to update them
manually each time I make changes to the site-wide files. But since
the search results come dynamically and the search results page in
pyblosxom needs to be rendered statically along with the rest of the
site, this is a little tricky.

But here's my solution: I have an empty file named header.txt. I
render that file with pyblosxom. It adds on its head.html with the
needed variables properly filled in. The new file is header.html, which
gets used by ht://Dig. Good. But then it adds its foot. Bad, because
the contents of the page, the search results, isn't actually there yet.

My solution: Have the header.txt file rendered using a flavor that has
an empty foot. Then make ht://Dig's footer.html contain the needed
</div></body></html> etc to match the pyblosxom head. 

This would be fine for me, because there are no variables in my
foot.html that need to be filled in, just closing tags. So I can even
make the ht://Dig footer.html (which is in its own special
configuration directory) just be a symbolic link to a pyblosxom
foot.html file.

I thought I could do this by just putting an empty foot.html file in
the same directory as the header.txt file. Isn't pyblosxom supposed to
use the versions of these files (head.html foot.html etc) that are
closest to the .txt file)? Pyblosxom would then add the foot on to
header.txt, but the foot would be blank.

It doesn't work. Every time, I get the standard foot.html attached to
the bottom of the page.

I also experimented with making a new flavor, .search, and creating
head.search etc. I tried with these flavor files both in the datadir
and in the pystaticfile's static directory. I set the config option to
have .search as a flavor to be rendered. It made files like
header.search, but it used head.html and foot.html to make them!

So, forgetting about all the ht://Dig stuff, my question boils down
to: how do I get a particular foot.html or foot.whatever to be used
for a particular file or directory when using static rendering and
pystaticfile?

FYI, I had no problems changing flavors and doing these things with
dynamic rendering.

-johnsu01
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBBViHQCRwR0q6GALYRAl+LAKCQpCrriDncguwL3J1RNzFraUDjoACgpRCA
iPOf63BTJ/mG9+9uZdY+QTM=
=otr2
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.