On 01/01/13 23:37, brad clements wrote:
> Hi,
>
> I would like to migrate from Soho to Nikola. Soho is based on ZPT and
> is just a static site generator. Generally, the contents of a 'src'
> directory are recursively copied to the output directory, and 'dirty'
> files are compiled as needed.
>
> e.g.
> src/index.rst -> output/index.htm
> src/somefolder/something.rst -> output/somefolder/something.htm
>
> I see now with plugin support I can add ZPT based templates (if I
> think that's easier than learning mako/jinja)
>
> But how do I handle recursive folder support? Searching through this
> forum I found a post on 'custom home page', which looked as if I'd
> need an entry in the conf.py file for every subdirectory. Is that the
> only way to do it?
That's something that may work now. In fact, we could do that
automatically, since the conf.py is python, so we could traverse the
folders and add the entries.
OTOH, recursive folders sounds like a nice-to-have, so... why not try to
have it?
It should not be terribly difficult to do.
> Also is there any way for a template engine to access meta data from
> every page (even non-dirty pages) during the render process?
Sure. The plugins have access to the site object (as self.site) and that
contains the whole timeline (self.site.timeline)
>
> For example I might want to automatically generate nav tabs (I
> realize might have to rebuild everything anyway to get them to come
> out correctly)
Right. You can do that, although it may involve lots of occasional
regeneration.
>
> (Is this what an index does for blog pages?)
>
> It seems like Nikola is mostly a blogging tool with some support for
> static pages, but I think I need a static site generator with support
> for blogging. Slightly different emphasis..
>
I am very willing to make Nikola a blogging tool with great static page
support too :-)
> Thanks
>