From cakoose at yahoo.com Mon Aug 6 05:19:19 2007 From: cakoose at yahoo.com (Kannan Goundan) Date: Mon, 6 Aug 2007 02:19:19 -0700 (PDT) Subject: [webgen-users] (no subject) Message-ID: <355001.34596.qm@web56315.mail.re3.yahoo.com> [Using webgen 0.4.5, ruby 1.8.5, Ubuntu Linux 7.04] I want "index.page" to use "index.template" and all other pages to use "default.template". Attempt 1: Just set the "template" key in "index.page": --- title: "Index Page" template: index.page --- 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. Attempt 2: Now change "index.template" to stop the template pipeline: --- template: - --- content, html Result: No change. What am I doing wrong? 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... - Kannan ____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ From t_leitner at gmx.at Mon Aug 6 08:54:27 2007 From: t_leitner at gmx.at (Thomas Leitner) Date: Mon, 6 Aug 2007 14:54:27 +0200 Subject: [webgen-users] (no subject) In-Reply-To: <355001.34596.qm@web56315.mail.re3.yahoo.com> References: <355001.34596.qm@web56315.mail.re3.yahoo.com> Message-ID: <3B7A66DD-7FE6-4C1D-A5AF-AE97FEB581F0@gmx.at> 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 From cakoose at yahoo.com Fri Aug 10 06:54:51 2007 From: cakoose at yahoo.com (Kannan Goundan) Date: Fri, 10 Aug 2007 03:54:51 -0700 (PDT) Subject: [webgen-users] Mix of PHP and HTML files. Message-ID: <586193.31164.qm@web56303.mail.re3.yahoo.com> Most of my website is static HTML, but I do have a couple PHP pages. I'd like the default template to be applied to it (i.e. I don't want it to just be copied). How can I get webgen to create the PHP file with the right extension in the output directory? A way to specify the following mapping would be nice: *.php.page -> *.php *.page -> *.html Thanks. - Kannan ____________________________________________________________________________________ Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 From t_leitner at gmx.at Fri Aug 10 08:55:21 2007 From: t_leitner at gmx.at (Thomas Leitner) Date: Fri, 10 Aug 2007 14:55:21 +0200 Subject: [webgen-users] Mix of PHP and HTML files. In-Reply-To: <586193.31164.qm@web56303.mail.re3.yahoo.com> References: <586193.31164.qm@web56303.mail.re3.yahoo.com> Message-ID: <4DE9A584-2051-4B07-93DE-8432F1845C68@gmx.at> On 10.08.2007, at 12:54, Kannan Goundan wrote: > Most of my website is static HTML, but I do have a couple PHP > pages. I'd like the default template to be applied to it (i.e. I > don't want it to just be copied). > > How can I get webgen to create the PHP file with the right > extension in the output directory? A way to specify the following > mapping would be nice: > > *.php.page -> *.php > *.page -> *.html You can use the following entry in the meta information section of page file to change the extension to .php: outputNameStyle: [:name, [., :lang], .php] Hope that helps, Thomas From cakoose at yahoo.com Fri Aug 10 09:45:17 2007 From: cakoose at yahoo.com (Kannan Goundan) Date: Fri, 10 Aug 2007 06:45:17 -0700 (PDT) Subject: [webgen-users] Mix of PHP and HTML files. Message-ID: <310616.75980.qm@web56311.mail.re3.yahoo.com> Thanks, Thomas. Just so I know how this works... Can any of the things listed under the "plugin parameters" documentation be put in the meta information section of the page file? ----- Original Message ---- From: Thomas Leitner To: Kannan Goundan Cc: webgen-users at rubyforge.org Sent: Friday, August 10, 2007 5:55:21 AM Subject: Re: [webgen-users] Mix of PHP and HTML files. On 10.08.2007, at 12:54, Kannan Goundan wrote: > Most of my website is static HTML, but I do have a couple PHP > pages. I'd like the default template to be applied to it (i.e. I > don't want it to just be copied). > > How can I get webgen to create the PHP file with the right > extension in the output directory? A way to specify the following > mapping would be nice: > > *.php.page -> *.php > *.page -> *.html You can use the following entry in the meta information section of page file to change the extension to .php: outputNameStyle: [:name, [., :lang], .php] Hope that helps, Thomas ____________________________________________________________________________________ Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz From t_leitner at gmx.at Sat Aug 11 02:15:20 2007 From: t_leitner at gmx.at (Thomas Leitner) Date: Sat, 11 Aug 2007 08:15:20 +0200 Subject: [webgen-users] Mix of PHP and HTML files. In-Reply-To: <310616.75980.qm@web56311.mail.re3.yahoo.com> References: <310616.75980.qm@web56311.mail.re3.yahoo.com> Message-ID: On 10.08.2007, at 15:45, Kannan Goundan wrote: > Thanks, Thomas. Just so I know how this works... Can any of the > things listed under the "plugin parameters" documentation be put in > the meta information section of the page file? The plugin parameters reference shows all available parameters of all plugins. A plugin parameter can be set to a different value in the configuration file. So these parameters have nothing to do with the keys for the meta information section. However, it is no coincidence that the global parameter value File/PageHandler:outputNameStyle and the per page file meta information key outputNameStyle have the same spelling: the latter overrides the former if set. Bye, Thomas