Let''s say I want to use a ".php" or ".htm" extension for my output files? How do I set that?
> Let''s say I want to use a ".php" or ".htm" extension for my output > files? How do I set that?See http://webgen.rubyforge.org/documentation/faq.html#_change_the_output_name_style and http://webgen.rubyforge.org/documentation/reference_metainfo.html#output_path_style -- Thomas
Perhaps I''m being obtuse, but I''m not understanding how to use this from the documentation. Perhaps a code sample would help? Anyone? On Aug 26, 3:01?am, Thomas Leitner <t_leit... at gmx.at> wrote:> > Let''s say I want to use a ".php" or ".htm" extension for my output > > files? How do I set that? > > Seehttp://webgen.rubyforge.org/documentation/faq.html#_change_the_output... > andhttp://webgen.rubyforge.org/documentation/reference_metainfo.html#out... > > -- Thomas > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users
Am Wed, 26 Aug 2009 10:07:28 -0700 (PDT) schrieb webinetics <matt.helmick at gmail.com>:> Perhaps I''m being obtuse, but I''m not understanding how to use this > from the documentation. Perhaps a code sample would help? Anyone?Three use cases: 1. You want to change the extension from .html to .php for all *.page files. Then you would add the following to your config.yaml file: default_meta_info: Page: output_path_style: [:parent, :basename, [., :lang], .php] 2. You want to change the extension for only some page files. This can be done using a meta information file. For example, you could add a page.metainfo file at the root of your source directory to change the extension for all *.page files in the interactive/ subdirectory: --- name:paths /interactive/*.page: output_path_style: [:parent, :basename, [., :lang], .php] 3. You want to change the extension for only one page file. This can be done in the page file itself: --- title: Some php file output_path_style: [:parent, :basename, [., :lang], .php] --- Some php content That''s it! -- Thomas
Thanks Thomas! That truly looks like a flexible solution. I''ll take it for a spin. On Aug 27, 12:12?am, Thomas Leitner <t_leit... at gmx.at> wrote:> Am Wed, 26 Aug 2009 10:07:28 -0700 (PDT) > schrieb webinetics <matt.helm... at gmail.com>: > > > Perhaps I''m being obtuse, but I''m not understanding how to use this > > from the documentation. Perhaps a code sample would help? Anyone? > > Three use cases: > > 1. You want to change the extension from .html to .php for all *.page > files. Then you would add the following to your config.yaml file: > > default_meta_info: > ? Page: > ? ? output_path_style: [:parent, :basename, [., :lang], .php] > > 2. You want to change the extension for only some page files. This can > be done using a meta information file. For example, you could add a > page.metainfo file at the root of your source directory to change the > extension for all *.page files in the interactive/ subdirectory: > > --- name:paths > /interactive/*.page: > ? output_path_style: [:parent, :basename, [., :lang], .php] > > 3. You want to change the extension for only one page file. This can be > done in the page file itself: > > --- > title: Some php file > output_path_style: [:parent, :basename, [., :lang], .php] > --- > Some php content > > That''s it! > > -- Thomas > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users