From guandalino at gmail.com Tue Sep 7 07:14:59 2010 From: guandalino at gmail.com (guandalino) Date: Tue, 7 Sep 2010 04:14:59 -0700 (PDT) Subject: [webgen-users] rake htmldoc generation problem Message-ID: <6d710574-2fd7-4334-8b05-fe081f2b235e@f25g2000yqc.googlegroups.com> Hi, I'd like to have documentation offline and for this reason I followed the instructions on webgen site, but with no success. This is the error I get: C:\Ruby186\lib\ruby\gems\1.8\gems\webgen-0.5.14>rake htmldoc (in C:/Ruby186/lib/ruby/gems/1.8/gems/webgen-0.5.14) C:/Ruby186/lib/ruby/gems/1.8/gems/rdoc-2.5.11/lib/rdoc/ruby_lex.rb:67: warning: parenthesize argument(s) for future version NO RELEASE NOTES/CHANGES FILE Starting webgen... Updating tree... rake aborted! Error while creating a node from with Webgen::So urceHandler::Directory: The needed parent path does not exist (See full trace by running task with --trace) This is the output if I run rake with trace option: C:\Ruby186\lib\ruby\gems\1.8\gems\webgen-0.5.14>rake htmldoc --trace (in C:/Ruby186/lib/ruby/gems/1.8/gems/webgen-0.5.14) C:/Ruby186/lib/ruby/gems/1.8/gems/rdoc-2.5.11/lib/rdoc/ruby_lex.rb:67: warning: parenthesize argument(s) for future version NO RELEASE NOTES/CHANGES FILE ** Invoke htmldoc (first_time) ** Execute htmldoc Starting webgen... Updating tree... rake aborted! Error while creating a node from with Webgen::So urceHandler::Directory: The needed parent path does not exist ./lib/webgen/sourcehandler/base.rb:274:in `parent_node' ./lib/webgen/sourcehandler/base.rb:222:in `create_node' ./lib/webgen/sourcehandler.rb:241:in `create_nodes' ./lib/webgen/sourcehandler.rb:222:in `create_nodes_from_paths' ./lib/webgen/sourcehandler.rb:218:in `each' ./lib/webgen/sourcehandler.rb:218:in `create_nodes_from_paths' ./lib/webgen/sourcehandler.rb:215:in `each' ./lib/webgen/sourcehandler.rb:215:in `create_nodes_from_paths' ./lib/webgen/sourcehandler.rb:214:in `each' ./lib/webgen/sourcehandler.rb:214:in `create_nodes_from_paths' ./lib/webgen/sourcehandler.rb:136:in `update_tree' ./lib/webgen/sourcehandler.rb:61:in `render' C:/Ruby186/lib/ruby/1.8/benchmark.rb:293:in `measure' ./lib/webgen/sourcehandler.rb:59:in `render' ./lib/webgen/website.rb:275:in `render' ./lib/webgen/website.rb:316:in `execute_in_env' ./lib/webgen/website.rb:270:in `render' ./lib/webgen/webgentask.rb:136:in `define' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_cal l_chain' C:/Ruby186/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_cal l_chain' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_excep tion_handling' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_excep tion_handling' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/Ruby186/bin/rake:19:in `load' C:/Ruby186/bin/rake:19 Is there a way to fix this? I'm new to ruby, so excuse me for the dumb question! Thanks, best regards. From t_leitner at gmx.at Thu Sep 9 06:47:55 2010 From: t_leitner at gmx.at (Thomas Leitner) Date: Thu, 9 Sep 2010 12:47:55 +0200 Subject: [webgen-users] rake htmldoc generation problem In-Reply-To: <6d710574-2fd7-4334-8b05-fe081f2b235e@f25g2000yqc.googlegroups.com> References: <6d710574-2fd7-4334-8b05-fe081f2b235e@f25g2000yqc.googlegroups.com> Message-ID: <20100909124755.5c42761a@noweto> Hi, On 2010-09-07 04:14 -0700 guandalino wrote: > Hi, I'd like to have documentation offline and for this reason I > followed the instructions on webgen site, but with no success. This is > the error I get: > > C:\Ruby186\lib\ruby\gems\1.8\gems\webgen-0.5.14>rake htmldoc > (in C:/Ruby186/lib/ruby/gems/1.8/gems/webgen-0.5.14) > C:/Ruby186/lib/ruby/gems/1.8/gems/rdoc-2.5.11/lib/rdoc/ruby_lex.rb:67: > warning: > parenthesize argument(s) for future version > NO RELEASE NOTES/CHANGES FILE > Starting webgen... > Updating tree... > rake aborted! > Error while creating a node from with > Webgen::So > urceHandler::Directory: > The needed parent path does not exist The problem is that Rubygems doesn't pack empty directories... Just create the directory doc/website_styles and you should be able to generate the website! Note: you may want to edit misc/default.template and remove the xmllint processor from the pipeline - this will make the generation process much faster! Best regards, Thomas From guandalino at gmail.com Sat Sep 18 09:15:44 2010 From: guandalino at gmail.com (guandalino) Date: Sat, 18 Sep 2010 06:15:44 -0700 (PDT) Subject: [webgen-users] Output Specific Options, help with output setting Message-ID: <1dc450aa-90cb-4043-b7a0-afb72ff4bd52@s19g2000vbr.googlegroups.com> Hello! As my Apache document root is set to C:/Program Files/Apache Software Foundation/Apache2.2/htdocs, I'd like that webgen could save output html there. I found that the configuration option "output" that does this job, but unluckily it doesn't always work (admitting it's not my fault somehow or a problem relating to my setup). Anyway, that's the weirdness: config.yaml (webgen 0.5.14) # This works. output: ["Webgen::Output::FileSystem", "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\webgen\d_and_d"] # This doesn't: output: ["Webgen::Output::FileSystem", "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\webgen\b_and_b"] X:\Development\Ruby\webgen\b_and_b\template\simple>webgen -v Starting webgen... Updating tree... ...done in 0.5608 seconds Writing changed nodes... /rooms/room-1.en.html An error has occurred: Error while rendering : Invalid argument - C:\Program Files\Apache Software Foundation \Apache2.2\htdocs\webge_and_b As a temporary workaround I could change Apache document root or move webgen generated output from the default location out to the current document root, but if I could get webgen do the job it'd be the best ;-) Many thanks! From t_leitner at gmx.at Sun Sep 19 03:13:31 2010 From: t_leitner at gmx.at (Thomas Leitner) Date: Sun, 19 Sep 2010 09:13:31 +0200 Subject: [webgen-users] Output Specific Options, help with output setting In-Reply-To: <1dc450aa-90cb-4043-b7a0-afb72ff4bd52@s19g2000vbr.googlegroups.com> References: <1dc450aa-90cb-4043-b7a0-afb72ff4bd52@s19g2000vbr.googlegroups.com> Message-ID: <20100919091331.15bf941e@noweto> > config.yaml (webgen 0.5.14) > # This works. > output: ["Webgen::Output::FileSystem", "C:\Program Files\Apache > Software Foundation\Apache2.2\htdocs\webgen\d_and_d"] > > # This doesn't: > output: ["Webgen::Output::FileSystem", "C:\Program Files\Apache > Software Foundation\Apache2.2\htdocs\webgen\b_and_b"] It seems that "\b" is handled specially by the Ruby YAML library in that it is assumed to be a control character. Use "\\b" instead and it should be fine! -- Thomas From guandalino at gmail.com Sun Sep 19 13:36:12 2010 From: guandalino at gmail.com (guandalino) Date: Sun, 19 Sep 2010 10:36:12 -0700 (PDT) Subject: [webgen-users] Output Specific Options, help with output setting In-Reply-To: <20100919091331.15bf941e@noweto> References: <1dc450aa-90cb-4043-b7a0-afb72ff4bd52@s19g2000vbr.googlegroups.com> <20100919091331.15bf941e@noweto> Message-ID: <713218bb-1158-432e-b0a4-b272ef99df84@c32g2000vbq.googlegroups.com> Thanks, worked! Same thing with \t ;-) Cheers From pnorcks at gmail.com Wed Sep 29 18:24:59 2010 From: pnorcks at gmail.com (Patrick McCarty) Date: Wed, 29 Sep 2010 15:24:59 -0700 Subject: [webgen-users] Trouble with menu generation Message-ID: Hello, I am having difficulties producing a menu to my liking (out-of-the-box), and I'm wondering if I discovered a bug... Consider a directory structure like this: default.template index.page about/index.page video/index.page contact/index.page where default.template has the tag {menu: } The only pages/directories I want *excluded* from this menu are video/ and video/index.page, so I set my "in_menu" entries accordingly. The problem is that video/index.page is not excluded from the menu, even if "in_menu: false" is set. I experimented with this for a bit, and I discovered that by removing all headers (h1, h2, etc.) from video/index.page, video/ and video/index.page *are* excluded from the menu, which is what I want. In other words, it seems that whenever a header has an "id" attribute, its containing page doesn't honor the "in_menu" setting. Is this a bug, or is there a solution that I overlooked? Thanks, Patrick P.S. As a workaround for now, I am adding the following line to my config.yaml: contentprocessor.kramdown.options: {:auto_ids: false} And then I can add custom classes (instead of id's) to use for styling. From t_leitner at gmx.at Thu Sep 30 03:01:32 2010 From: t_leitner at gmx.at (Thomas Leitner) Date: Thu, 30 Sep 2010 09:01:32 +0200 Subject: [webgen-users] Trouble with menu generation In-Reply-To: References: Message-ID: <20100930090132.2ae4aa13@noweto> On 2010-09-29 15:24 -0700 Patrick McCarty wrote: > The only pages/directories I want *excluded* from this menu are video/ > and video/index.page, so I set my "in_menu" entries accordingly. > > The problem is that video/index.page is not excluded from the menu, > even if "in_menu: false" is set. > > I experimented with this for a bit, and I discovered that by removing > all headers (h1, h2, etc.) from video/index.page, video/ and > video/index.page *are* excluded from the menu, which is what I want. > > In other words, it seems that whenever a header has an "id" attribute, > its containing page doesn't honor the "in_menu" setting. > > Is this a bug, or is there a solution that I overlooked? You need to look into the default.template where the menu is defined and set the key-value pair `used_nodes: files`. If this key is not set or set to `all`, then all nodes, even fragment nodes generated from headers with IDs, are used in a menu! Also see http://webgen.rubyforge.org/documentation/reference_configuration.html#tagmenuusednodes -- Thomas From pnorcks at gmail.com Thu Sep 30 12:16:15 2010 From: pnorcks at gmail.com (Patrick McCarty) Date: Thu, 30 Sep 2010 09:16:15 -0700 Subject: [webgen-users] Trouble with menu generation In-Reply-To: <20100930090132.2ae4aa13@noweto> References: <20100930090132.2ae4aa13@noweto> Message-ID: <20100930161615.GA4207@mail.google.com> On 2010-09-30, Thomas Leitner wrote: > On 2010-09-29 15:24 -0700 Patrick McCarty wrote: > > > > In other words, it seems that whenever a header has an "id" attribute, > > its containing page doesn't honor the "in_menu" setting. > > > > Is this a bug, or is there a solution that I overlooked? > > You need to look into the default.template where the menu is defined > and set the key-value pair `used_nodes: files`. If this key is not set > or set to `all`, then all nodes, even fragment nodes generated from > headers with IDs, are used in a menu! > > Also see > http://webgen.rubyforge.org/documentation/reference_configuration.html#tagmenuusednodes That is exactly what I was looking for. Thanks! -Patrick