I''ve read the docs. Honestly. But, I still can''t get my site working with the latest gem. I''m confused over when and how I need to specify content blocks, and how these relate to the stuff in config.yaml. The specific problem is with my analytics file include, I get errors like this: An error has occurred: Error while processing </analytics.en.html>: Error rendering </analytics.en.html>: no block named ''content'' in </default.template> Here is my config.yaml: default_meta_info: Page: blocks: default: {pipeline: tags,redcloth,blocks} Template: blocks: default: {pipeline: tags,redcloth,blocks} Here are the relevant parts of my default.template: --- name:content, pipeline:tags,redcloth,blocks <html> <body> <div id="content"> <webgen:block name="content" /> </div> {includeFile: {filename: analytics.page, escapeHTML: false, processOutput: false}} </body> </html> And here is my analytics.page: <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-1234567-1"; urchinTracker(); </script> I get the same error even if I remove the includeFile directive. Thanks, -- Chad
Hello, can this be a problem because you named your analytics.page with ''.page'' extension? Try to rename it, so it isn''t processed by webgen (or try to ignore it somehow... I use "no_output: true" for my news.page). -Peter Chad Woolley wrote:> I''ve read the docs. Honestly. But, I still can''t get my site working > with the latest gem. I''m confused over when and how I need to specify > content blocks, and how these relate to the stuff in config.yaml. > > The specific problem is with my analytics file include, I get errors like this: > An error has occurred: Error while processing > </analytics.en.html>: Error rendering </analytics.en.html>: no block > named ''content'' in </default.template> > > Here is my config.yaml: > default_meta_info: > Page: > blocks: > default: {pipeline: tags,redcloth,blocks} > Template: > blocks: > default: {pipeline: tags,redcloth,blocks} > > > Here are the relevant parts of my default.template: > --- name:content, pipeline:tags,redcloth,blocks > <html> > <body> > <div id="content"> > <webgen:block name="content" /> > </div> > {includeFile: {filename: analytics.page, escapeHTML: false, > processOutput: false}} > </body> > </html> > > > And here is my analytics.page: > <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> > </script> > <script type="text/javascript"> > _uacct = "UA-1234567-1"; > urchinTracker(); > </script> > > I get the same error even if I remove the includeFile directive. > > Thanks, > -- Chad > _______________________________________________ > webgen-users mailing list > webgen-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/webgen-users >
Am Fri, 5 Sep 2008 00:43:15 -0700 schrieb "Chad Woolley" <thewoolleyman at gmail.com>:> Here are the relevant parts of my default.template: > --- name:content, pipeline:tags,redcloth,blocks > <html> > <body> > <div id="content"> > <webgen:block name="content" /> > </div> > {includeFile: {filename: analytics.page, escapeHTML: false, > processOutput: false}} > </body> > </html>Two problems here: * The name of your block is "content," - you have to remove the comma at the end of the name. Then you get the correct name ''content''. * Since 0.5.x uses under_scores instead of camelCase you have to adjust your includeFile tag to read: {include_file: {filename: analytics.page, escape_html: false, process_output: false}} -- Thomas
Am Fri, 05 Sep 2008 10:10:52 +0200 schrieb Peter Stibrany <pstibrany at gmail.com>:> Hello, > > can this be a problem because you named your analytics.page with > ''.page'' extension? Try to rename it, so it isn''t processed by webgen > (or try to ignore it somehow... I use "no_output: true" for my > news.page).No, there is no problem with the extension since the `tag.includefile.filename` really specifies a filename and not an internal webgen name. So the file should be found. As to whether webgen should process the analytics.page or not: this depends. Since the page only seems to have the google analytics code I don''t think that it is intended as a real webgen page. Renaming to something webgen doesn''t process would be an option. Or you could use the meta info `draft` on the page which prevents webgen from creating a node for it which is even better than `no_output` (here a node is created but not written to the output directory). -- Thomas