From peter.de.keer at gmail.com Mon Jun 21 12:49:36 2010 From: peter.de.keer at gmail.com (Tixiv) Date: Mon, 21 Jun 2010 09:49:36 -0700 (PDT) Subject: [webgen-users] webgen webgui Message-ID: Just started out with ruby, webgen... I get an error: NoMethodError at /manage_website undefined method `escapeHTML' for Innate::Helper::CGI:Module C:/Ruby19/lib/ruby/gems/1.9.1/gems/webgen-0.5.12/data/webgen/webgui/ view/manage_website.xhtml: in block in compile, line 16 see also: http://i.imgur.com/xes4v.jpg I'm using ruby 1.9.1 (not recommended) I just wanted to see what you guys got there in the webgui. I would really like to get it working... Please advise From michaelfranzl at gmx.at Tue Jun 22 07:43:05 2010 From: michaelfranzl at gmx.at (Michael Franzl) Date: Tue, 22 Jun 2010 13:43:05 +0200 Subject: [webgen-users] menu tag suggestions Message-ID: <4C20A1C9.5000806@gmx.at> There are some functions that I miss while using the menu tag: 1) Would it be possible for the used_nodes option to draw a distinction between files and directories? 2) Would it make sense to use not only H1 for the fragments, but also H2, H3, etc.? 3) Would it be possible to instruct the menu tag to render menu items that are outside of the current branch of the hierarchy? Example tree: +--directoryA | |--fileA1.html | |--fileA2.html | |--directoryB | |--contact.html |--about.html |--index.html Suggestion 1) could be used to just render "contact" and "about", which is the case for a typical meta navigation menu, which otherwise needs be created manually. Possibility 3) could be used to render "fileA1" and "fileA2" while being inside of "about". It is easy to think of examples where this is useful. For what it's worth... Michael From t_leitner at gmx.at Tue Jun 22 10:01:39 2010 From: t_leitner at gmx.at (Thomas Leitner) Date: Tue, 22 Jun 2010 16:01:39 +0200 Subject: [webgen-users] webgen webgui In-Reply-To: References: Message-ID: <20100622160139.22dbcabc@noweto> On 2010-06-21 09:49 -0700 Tixiv wrote: > Just started out with ruby, webgen... > > I get an error: > NoMethodError at /manage_website > undefined method `escapeHTML' for Innate::Helper::CGI:Module > C:/Ruby19/lib/ruby/gems/1.9.1/gems/webgen-0.5.12/data/webgen/webgui/ > view/manage_website.xhtml: in block in compile, line 16 > > see also: > http://i.imgur.com/xes4v.jpg > > I'm using ruby 1.9.1 (not recommended) Did you install the correct Ramaze version, i.e. Ramaze 2009.04? I have not tested the webui with newer versions! You may need to download the .gem file yourself and install manually since it seems that this version is not available on the central gem repo anymore. Also note that the webgui is currently unmaintained.... Besides, everything the webgui is able to do, the webgen command also do. And you can get a preview of all available website styles on the webgen homepage, just have a look at http://webgen.rubyforge.org/documentation/reference_website_styles.html (this is the only feature the webgui has that the webgen command does not have). You can easily create a website by running webgen create MYSITE Best regards, Thomas From t_leitner at gmx.at Tue Jun 22 10:16:53 2010 From: t_leitner at gmx.at (Thomas Leitner) Date: Tue, 22 Jun 2010 16:16:53 +0200 Subject: [webgen-users] menu tag suggestions In-Reply-To: <4C20A1C9.5000806@gmx.at> References: <4C20A1C9.5000806@gmx.at> Message-ID: <20100622161653.2d96f7c5@noweto> On 2010-06-22 13:43 +0200 Michael Franzl wrote: > There are some functions that I miss while using the menu tag: > > 1) Would it be possible for the used_nodes option to draw a > distinction between files and directories? This could probably be done, yes. But note that when files in a sub directory are in the menu, the sub directory will also be in the menu! Referring to your example tree, if you want to use the menu tag for rendering a menu consisting of only "contact" and "about", these two pages have to be in the menu. So just restrict the menu to showing only one level and make sure that the directories themselves don't have the `in_menu` key set. Then only "contact" and "about" will show up in the menu. > 2) Would it make sense to use not only H1 for the fragments, but also > H2, H3, etc.? This is already done. Just make sure that all headers you want to fragment nodes for have an ID set. > 3) Would it be possible to instruct the menu tag to render menu items > that are outside of the current branch of the hierarchy? > > Possibility 3) could be used to render "fileA1" and "fileA2" while > being inside of "about". It is easy to think of examples where this > is useful. This can be already be done. Just set the `min_levels` option of the menu tag to `2` and `show_current_subtree_only` to `false`. Then the second menu level is shown although "about" is on the first menu level. Note, however, that all other second level menu items would also be shown. > Example tree: > > +--directoryA > | |--fileA1.html > | |--fileA2.html > | > |--directoryB > | > |--contact.html > |--about.html > |--index.html I already have many notes and todos regarding the restructuration of the menu tag so that it will be more useful and versatile... However, I don't know when these changes will be implemented. -- Thomas From michaelfranzl at gmx.at Tue Jun 22 17:20:09 2010 From: michaelfranzl at gmx.at (Michael Franzl) Date: Tue, 22 Jun 2010 23:20:09 +0200 Subject: [webgen-users] menu tag suggestions In-Reply-To: <20100622161653.2d96f7c5@noweto> References: <4C20A1C9.5000806@gmx.at> <20100622161653.2d96f7c5@noweto> Message-ID: <4C212909.2030709@gmx.at> Thomas Leitner wrote: > Referring to your example tree, if you want to use the menu tag for > rendering a menu consisting of only "contact" and "about", these two > pages have to be in the menu. So just restrict the menu to showing only > one level and make sure that the directories themselves don't have the > `in_menu` key set. Then only "contact" and "about" will show up in the > menu. This works if there is just one menu. But when there are two menus (e.g. one main menu and one meta navigation menu) the in_menu settings will conflict, because it is different from menu to menu. >> 2) Would it make sense to use not only H1 for the fragments, but also >> H2, H3, etc.? > > This is already done. Just make sure that all headers you want to > fragment nodes for have an ID set. Ah, what I was missing the min_levels option. Thanks. >> 3) Would it be possible to instruct the menu tag to render menu items >> that are outside of the current branch of the hierarchy? >> >> Possibility 3) could be used to render "fileA1" and "fileA2" while >> being inside of "about". It is easy to think of examples where this >> is useful. > > This can be already be done. Just set the `min_levels` option of the > menu tag to `2` and `show_current_subtree_only` to `false`. Then the > second menu level is shown although "about" is on the first menu level. > Note, however, that all other second level menu items would also be > shown. That all other second level menu items would also be shown is a disadvantage I think. Maybe in the future it is possible to specify "directoryA" to the menu tag, and it will descend only from there. > I already have many notes and todos regarding the restructuration of the > menu tag so that it will be more useful and versatile... However, I > don't know when these changes will be implemented. No problem or hurry, I just thought I make those suggestions because I encountered them in a project. Thanks, Michael From michaelfranzl at gmx.at Fri Jun 25 05:34:14 2010 From: michaelfranzl at gmx.at (Michael Franzl) Date: Fri, 25 Jun 2010 11:34:14 +0200 Subject: [webgen-users] Deprecation warning Message-ID: <4C247816.6050008@gmx.at> I'm receiving the following message: DEPRECATION WARNING: this method will be deprecated in the next release, use #html_attributes instead I cannot deduce the cause of this. Michael From t_leitner at gmx.at Fri Jun 25 14:59:41 2010 From: t_leitner at gmx.at (Thomas Leitner) Date: Fri, 25 Jun 2010 20:59:41 +0200 Subject: [webgen-users] Deprecation warning In-Reply-To: <4C247816.6050008@gmx.at> References: <4C247816.6050008@gmx.at> Message-ID: <20100625205941.385918f2@noweto> On 2010-06-25 11:34 +0200 Michael Franzl wrote: > I'm receiving the following message: > > DEPRECATION WARNING: this method will be deprecated in the next > release, use #html_attributes instead > > I cannot deduce the cause of this. This comes from the latest kramdown release and can be ignored - will release a new webgen version soon which uses the new API. -- Thomas From michaelfranzl at gmx.at Tue Jun 29 08:17:42 2010 From: michaelfranzl at gmx.at (Michael Franzl) Date: Tue, 29 Jun 2010 14:17:42 +0200 Subject: [webgen-users] menu tag suggestions In-Reply-To: <20100622161653.2d96f7c5@noweto> References: <4C20A1C9.5000806@gmx.at> <20100622161653.2d96f7c5@noweto> Message-ID: <4C29E466.3070101@gmx.at> Another suggestion from me ;) Sometimes web developers want to make the format of an html element dependent on the content of the element. For example you have a menu with two entries, and you want each entry have a different color (say "summer" should be red, "winter" should be blue, etc.). This is not possible in an automatically generated menu, without id or class attributes set. Would it be possible to add an id or class attribute also to menu entries (li and span), as it is done in headers? Michael From t_leitner at gmx.at Tue Jun 29 16:43:01 2010 From: t_leitner at gmx.at (Thomas Leitner) Date: Tue, 29 Jun 2010 22:43:01 +0200 Subject: [webgen-users] menu tag suggestions In-Reply-To: <4C29E466.3070101@gmx.at> References: <4C20A1C9.5000806@gmx.at> <20100622161653.2d96f7c5@noweto> <4C29E466.3070101@gmx.at> Message-ID: <20100629224301.0ea434fc@noweto> On 2010-06-29 14:17 +0200 Michael Franzl wrote: > Another suggestion from me ;) > > Sometimes web developers want to make the format of an html element > dependent on the content of the element. For example you have a menu > with two entries, and you want each entry have a different color (say > "summer" should be red, "winter" should be blue, etc.). This is not > possible in an automatically generated menu, without id or class > attributes set. > > Would it be possible to add an id or class attribute also to menu > entries (li and span), as it is done in headers? This is already possible: just use the `link_attrs` meta information key to set a class for automatically generated links to a page. Then you can use hierarchical CSS tags to only style, for example, a link/span when it appears in a menu. For example, a link to the following `src/index.page`: --- title: Test in_menu: true link_attrs: class: hallo --- Just a test would generate the following link (or span): Test As you can see, the generated link has the `hallo` class set. If such a link is generated for a menu, you could use the following CSS rules to style the link differently (if the generated menu is wrapped in an element with the id `menu`): #menu a.hallo, #menu span.hallo { color: blue; } Best regards, Thomas