[webgen-users] (no subject)

Thomas Leitner t_leitner at gmx.at
Mon Aug 6 08:54:27 EDT 2007


Hi,

> Attempt 1: Just set the "template" key in "index.page":
>    ---
>    title: "Index Page"
>    template: index.page
                index.template
>    --- content, markdown
>    ...
>


> Result: "index.page" gets rendered with "index.template" *and*  
> "default.template" (nested).  The docs say that this can happen and  
> recommend using "template: -" to stop it.

Yeah, the default behaviour is rendering the default.template. You  
need to explicitly stop the render pipeline setting a null template.  
This is done with the tilde character, not a dash.

> Attempt 2: Now change "index.template" to stop the template pipeline:
>    ---
>    template: -
      template: ~
>    --- content, html
>
> Result: No change.
>
> What am I doing wrong?

Explained above: don't use '-' but '~'!

> Also, while attempting to try various things, I ran into some  
> unexpected behavior with "defaultMetaInfo".  I thought that it  
> specified
> the default values, and each page was allowed to override those
> values.  However, it looks like the "defaultMetaInfo" values are
> overriding the meta info in each page.
>
>
>
> config.yaml:
>
>    File/PageHandler
>
>       defaultMetaInfo:
>
>          title: "Default Title"
>
>
>
> src/index.page:
>
>    ---
>
>    title: "Index Page"
>
>    --- content, markdown
>
>    ...
>
>
>
> When I run webgen, all my pages have the title "Default Title".  If I
> remove the "title" entry from the "defaultMetaInfo", then all the  
> pages
> have their correct titles.  Is this expected?  It doesn't seem to  
> make sense for the top-level "defaults" to *always* override page- 
> specific settings, so I wonder what I'm missing here...

Your not missing anything ;-) It's a bug, thanks for reporting it. I  
have looked at the devel version - there it works as expected.

Bye,
   Thomas


More information about the webgen-users mailing list