Re: [RFC] Add "static_flavours_main" config var
"Will Guaraldi" <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Static rendering can already do this sort of thing. You should set your properties like this: static_flavours = ["html"] static_urls = ["/index.atom"] That'll render everything in html and then additionally render the /index.atom page which is the Atom feed for your index/main page. There's some information about this at the bottom of the documentation on static rendering: http://pyblosxom.sourceforge.net/1.4/manual/static_rendering.html under "Rendering other URLs". Hope that helps! Also, I hope it works--I haven't done much static rendering lately. /will ps. One thing you could do is open up a bug for issues in our SourceForge bugtracker, attach the various files, and then send a URL to the list pointing to your particular bug. On 8/20/07, Steve Hoelzer <[email protected]> wrote: > I'm just getting started with pyblosxom (v1.4.1) and I'm playing with > static rendering. I wanted to generate just one atom file at the root > level instead of having atom files for every category and date page. > That would significantly cut down rendering time, disk space, and FTP > bandwidth. > > It seems like a decent way to do this is to introduce a new config > var, "static_flavours_main", that specifies a separate set of flavours > for the main page. If that var is not set in config.py, it should > default to the value of "static_flavours". > > Here are the small changes I made to do this. > > > In config.py, define "static_flavours" and "static_flavours_main": > > # What flavours should get generated? > py["static_flavours"] = ["html"] > > # Different flavours for main page? > py["static_flavours_main"] = ["html", "atom"] > > > In pyblosxom.py: > > Define "flavoursmain" right after "flavours" > > flavours = config.get("static_flavours", ["html"]) > flavoursmain = config.get("static_flavours_main", flavours) > > And then, after the loop to collect individual entries: > > if len(renderme) > 0: > # render the main page in specified flavours > for f in flavoursmain: > renderme.append( ("/index." + f, "") ) > > Steve > > P.S. List admins: I sent a similar e-mail to the list last week, and > it was blocked as too large because I included entire source files. > That old e-mail can be ignored. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/