From t_leitner at gmx.at Wed Apr 1 00:47:10 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Wed, 1 Apr 2009 06:47:10 +0200 Subject: [webgen-users] 2 questions: printable version / labels In-Reply-To: <65a60f71-05a3-4bb6-a02d-f106bba9e2f6@y9g2000yqg.googlegroups.com> References: <20090330165830.2f0dcbdd@77.116.131.168.wireless.dyn.drei.com> <65a60f71-05a3-4bb6-a02d-f106bba9e2f6@y9g2000yqg.googlegroups.com> Message-ID: <20090401064710.20363147@77.116.131.168.wireless.dyn.drei.com> > Doing it using CSS is what I meant. I'd like to make webgen generate > the normal webpage and the html-file intended for printing (which > would, indeed, use some different and sobre css) from a single .page > file. I just don't know what would be the most elegant and efficient > way to do it. Okay, then just use the page files as they were mainly intended to, namely to generate one HTML file from one page file and specify two different CSS files in your default.template: one for the screen version and one for the print version. This can be done like this: > > By the way: what exactly do you mean by indexing? If you want to > > list pages according to certain meta information, this should be > > doable by using some ERB fragments in your page/template files. > > Naturally, this would mean that you need a basic knowledge of the > > Ruby programming language. However, if you tell me enough of what > > you want to do, I should be able to jumpstart your coding. > This is also what I meant. It just wasn't clear to me to what extent > the blogging support was already implemented :) > I'd like to add meta-information to certain .page files and then list > these on overview pages. Sticking with the restaurant page, such .page > file would contain a section like > --- > style: thai food > pricerange: expensive > --- > and there would be an overview page listing all styles and all price > ranges, and a page for each style, listing all restaurants in that > style. I don't want to ask you to do the coding, but if you could give > me some pointers as to how this would fit best into the webgen > framework, I'd sure be grateful :) > I've toyed with php scripted pages before, so I guess I should be able > to pull this off when I learn some ruby... I assume that you have the following files under src/: /overview.page /restaurants/rest1.page /restaurants/rest2.page Then you can start with the following fragment for listing the styles for the overview page: Listing all styles: <% context.content_node.tree['/restaurants'].children.select {|c| c['kind'] == 'page'}. collect {|c| c['style']}.uniq.sort.each do |style| style_node = '/style_' + style.tr(' ', '_') + '.html' %> <%= context.dest_node.link_to(style_node) %> <% end %> It works exactly the same for the price range listing but you have to replace the word 'style' for 'pricerange' in the code above. The code searches for all page files under the '/restaurants' directory and collects all style meta informations (`.uniq.sort` removes duplicates and sorts the entries by name). Since each style has its own page file, the canoncial name for the style node is constructed and finally a link to the style node is put into the page file. So, this is the easy part. What's more difficult, is to generate a style/price range file for each style/price range. Generating files is normally done using source handlers. However, this is not needed here since the file that would be used the source handler, would be empty. Also, since the overview page lists alls styles and price ranges it would be the ideal page to generate the other ones since every page listed here would definitely be needed. This can be done by either creating a specific tag which, for example, lists all styles and creates the style page (or the price range equivalents) or by a small helper function. I would go for the tag! The tikz tag does something similar: it generates image nodes when called so you may have a look at source code for it in lib/webgen/tag/tikz.rb. -- Thomas From t_leitner at gmx.at Wed Apr 1 00:51:30 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Wed, 1 Apr 2009 06:51:30 +0200 Subject: [webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?] In-Reply-To: References: <20090313111509.51700641@77.118.56.134.wireless.dyn.drei.com> <20090328071351.15a6a745@77.116.131.168.wireless.dyn.drei.com> <20090328195056.6d2e1183@77.116.131.168.wireless.dyn.drei.com> <20090329163732.0e694a35@77.116.131.168.wireless.dyn.drei.com> <20090329193925.13121017@77.116.131.168.wireless.dyn.drei.com> <20090330110424.50961021@77.116.131.168.wireless.dyn.drei.com> <20090331103419.2b92ff00@77.116.131.168.wireless.dyn.drei.com> Message-ID: <20090401065130.17818a77@77.116.131.168.wireless.dyn.drei.com> > I have > > faq/index.virtual: > > \--- !omap > - index.html: > url: /faq.html > routed_title: FAQ > > When I created this and other similar files, already rendered pages > pointing to a non-existent index within the directory (faq/), were > not automatically updated to reflect this "redirection" of > faq/(index.html) to faq.html. It was simplest to delete webgen.cache > to have them updated. Thanks for the test case! I have added this to my TODO list to investigate it. This behaviour will probably affect not only directory index files but links/references to all nodes, but these cases appear only very seldom. -- Thomas From mrprufrock at gmail.com Wed Apr 1 22:35:05 2009 From: mrprufrock at gmail.com (JayJay) Date: Wed, 1 Apr 2009 19:35:05 -0700 (PDT) Subject: [webgen-users] Generate static menus? Message-ID: <049c6dd0-abdd-4dad-b68c-0c6df90f3ef6@p6g2000pre.googlegroups.com> I want to stack three horizontal menus on top of each other, and also define exactly what page will be in each menu. What files and syntax do I use in webgen to accomplish this? I tried finding the answer here and in the docs but could not figure it out. I would also like to style each menu a bit differently if that is possible. Actual examples especially appreciated! Thanks! From t_leitner at gmx.at Thu Apr 2 10:35:26 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Thu, 2 Apr 2009 16:35:26 +0200 Subject: [webgen-users] Generate static menus? In-Reply-To: <049c6dd0-abdd-4dad-b68c-0c6df90f3ef6@p6g2000pre.googlegroups.com> References: <049c6dd0-abdd-4dad-b68c-0c6df90f3ef6@p6g2000pre.googlegroups.com> Message-ID: <20090402163526.0dc8b667@77.116.131.168.wireless.dyn.drei.com> > I want to stack three horizontal menus on top of each other, and also > define exactly what page will be in each menu. What files and syntax > do I use in webgen to accomplish this? I tried finding the answer here > and in the docs but could not figure it out. > > I would also like to style each menu a bit differently if that is > possible. Actual examples especially appreciated! For generating horizontal menus, use a menu tag like {menu: {nested: false, min_levels: 1, show_current_subtree_only: true}} Also have a look at the documentation for the menu tag at http://webgen.rubyforge.org/documentation/tag/menu.html webgen currently only has the concept of *one* menu. So, the only time when multiple "menu lines" are generated by the above shown tag, is when the currently viewed page is in a sub directory. For example, if you have the following hierarchy: /level1.page /dir1/level2.page /dir1/nesteddir/level3.page And you visit the /dir1/nesteddir/level3.html file, three menu levels are shown: one for the top level, one for the first level and one for the second level. Generating different menus, ie. with different menu items, is currently not possible with the menu tag. You can specify what gets into the menu by using the meta information `in_menu`. Each page that has this meta info set to `true` will get included in the menu. Note that there are different menu trees for different languages. Different styling for different levels can be done by using the CSS classes set on the generated elements - these classes are documented on the documentation page for the menu tag ( http://webgen.rubyforge.org/documentation/tag/menu.html ) -- Thomas From kannan at cakoose.com Fri Apr 3 16:48:33 2009 From: kannan at cakoose.com (Kannan Goundan) Date: Fri, 3 Apr 2009 13:48:33 -0700 (PDT) Subject: [webgen-users] GEM install failed (missing facets 2.4.3) Message-ID: I'm on Ubuntu 8.10. I installed Ruby Gems via the package manager, which I believe corresponds to Gems 1.2. I tried installing webgen and got an error: # sudo gem install --development webgen ERROR: Error installing webgen: webgen requires facets (= 2.4.3, runtime) From t_leitner at gmx.at Sat Apr 4 02:35:42 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Sat, 4 Apr 2009 08:35:42 +0200 Subject: [webgen-users] GEM install failed (missing facets 2.4.3) In-Reply-To: References: Message-ID: <20090404083542.3255a892@77.116.131.168.wireless.dyn.drei.com> > I'm on Ubuntu 8.10. I installed Ruby Gems via the package manager, > which I believe corresponds to Gems 1.2. > > I tried installing webgen and got an error: > > # sudo gem install --development webgen > ERROR: Error installing webgen: > webgen requires facets (= 2.4.3, runtime) This seems to be coming from the old rubygems version. Do the following and it should work: sudo gem install rubygems-update sudo /var/lib/gems/1.8/bin/update_rubygems sudo gem install webgen sudo gem install --development webgen The update_rubygems script may name you binary gem1.8, so you may change the last two `gem` commands to `gem1.8`. Also note that there sometimes seems to be a problem when installing webgen with the `--development` switch of Rubygems - this is a rubygems problem but I will try to find out why this sometimes doesn't work. -- Thomas From thomas.danckaert at gmail.com Sun Apr 5 10:38:52 2009 From: thomas.danckaert at gmail.com (Thomas Danckaert) Date: Sun, 5 Apr 2009 07:38:52 -0700 (PDT) Subject: [webgen-users] 2 questions: printable version / labels In-Reply-To: <20090401064710.20363147@77.116.131.168.wireless.dyn.drei.com> References: <20090330165830.2f0dcbdd@77.116.131.168.wireless.dyn.drei.com> <65a60f71-05a3-4bb6-a02d-f106bba9e2f6@y9g2000yqg.googlegroups.com> <20090401064710.20363147@77.116.131.168.wireless.dyn.drei.com> Message-ID: <94d30d2d-2a20-48e2-8b9e-d511ff79518f@j8g2000yql.googlegroups.com> > I assume that you have the following files under src/: > > ? ? /overview.page > ? ? /restaurants/rest1.page > ? ? /restaurants/rest2.page > > Then you can start with the following fragment for listing the styles > for the overview page: > > ? ? Listing all styles: > ? ? <% > ? ? context.content_node.tree['/restaurants'].children.select {|c| c['kind'] == 'page'}. > ? ? ? ? ? ? collect {|c| c['style']}.uniq.sort.each do |style| > ? ? ? style_node = '/style_' + style.tr(' ', '_') + '.html' > ? ? %> > ? ? <%= context.dest_node.link_to(style_node) %> > ? ? <% end %> First of all: thanks for the advice I've been trying to get this to work, but I'm running into some trouble. For testing, I created 2 .page files under /restaurants, one with the meta-information 'style: Thai' and one with 'style: Dutch'. Then I created 'styleoverview.page' with the above code, and manually added 'style_Dutch.page' and 'style_Thai.page' to the root directory. (Creating these pages programmatically with a tag will be the next step). I ran into the following error: "An error has occurred: Erb processing failed in : undefined method `routing_node' for "/ style_Dutch.html":String" I browsed the API, and I think for the method call 'link_to (style_node)' to work, the variable style_node should contain a node, instead of a string, as in the example code you gave? I tried solving this by changing the code into <% context.content_node.tree['/restaurants'].children.select {|c| c ['kind'] == 'page'}. collect {|c| c['style']}.uniq.sort.each do |style| style_node = context.content_node.resolve('/style_' + style.tr (' ', '_') + '.html') %> <%= context.dest_node.link_to(style_node) %> <% end %> (I manually created nodes with the appropriate page files) but this gives me the error "An error has occurred: Erb processing failed in : undefined method `[]' for nil:NilClass" I'm a bit lost here... From t_leitner at gmx.at Mon Apr 13 04:03:36 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Mon, 13 Apr 2009 10:03:36 +0200 Subject: [webgen-users] 2 questions: printable version / labels In-Reply-To: <94d30d2d-2a20-48e2-8b9e-d511ff79518f@j8g2000yql.googlegroups.com> References: <20090330165830.2f0dcbdd@77.116.131.168.wireless.dyn.drei.com> <65a60f71-05a3-4bb6-a02d-f106bba9e2f6@y9g2000yqg.googlegroups.com> <20090401064710.20363147@77.116.131.168.wireless.dyn.drei.com> <94d30d2d-2a20-48e2-8b9e-d511ff79518f@j8g2000yql.googlegroups.com> Message-ID: <20090413100336.0feedf2d@77.116.157.222.wireless.dyn.drei.com> > I ran into the following error: > "An error has occurred: Erb processing failed in styleoverview.en.html>: undefined method `routing_node' for "/ > style_Dutch.html":String" Sorry, my mistake, the Node#link_to method takes a node as you already found out. > I browsed the API, and I think for the method call 'link_to > (style_node)' to work, the variable style_node should contain a node, > instead of a string, as in the example code you gave? I tried solving > this by changing the code into > > <% > context.content_node.tree['/restaurants'].children.select {|c| c > ['kind'] == 'page'}. > collect {|c| c['style']}.uniq.sort.each do |style| > style_node = context.content_node.resolve('/style_' + style.tr > (' ', '_') + '.html') > %> > <%= context.dest_node.link_to(style_node) %> > <% end %> > (I manually created nodes with the appropriate page files) > > but this gives me the error > "An error has occurred: Erb processing failed in styleoverview.en.html>: undefined method `[]' for nil:NilClass" Try this: Listing all styles: <% context.content_node.tree['/restaurants'].children.select {|c| c['kind'] == 'page'}. collect {|c| c['style']}.uniq.sort.each do |style| style_path = '/style_' + style.downcase.tr(' ', '_') + '.html' style_node = context.ref_node.resolve(style_path, context.content_node.lang) %> <%= context.dest_node.link_to(style_node) %> <% end %> The problem was that the call to Node#resolve tried to resolve the path without a language which naturally failed. After adding the needed language as second parameter it works. -- Thomas ps. Sorry for the late answer, been on vacation the last week. From thomas.danckaert at gmail.com Wed Apr 15 16:22:53 2009 From: thomas.danckaert at gmail.com (Thomas Danckaert) Date: Wed, 15 Apr 2009 13:22:53 -0700 (PDT) Subject: [webgen-users] 2 questions: printable version / labels In-Reply-To: <20090413100336.0feedf2d@77.116.157.222.wireless.dyn.drei.com> References: <20090330165830.2f0dcbdd@77.116.131.168.wireless.dyn.drei.com> <65a60f71-05a3-4bb6-a02d-f106bba9e2f6@y9g2000yqg.googlegroups.com> <20090401064710.20363147@77.116.131.168.wireless.dyn.drei.com> <94d30d2d-2a20-48e2-8b9e-d511ff79518f@j8g2000yql.googlegroups.com> <20090413100336.0feedf2d@77.116.157.222.wireless.dyn.drei.com> Message-ID: Yes, that works fine. I somehow missed that resolve() takes 2 arguments, though its written there quite clearly. On Apr 13, 10:03?am, Thomas Leitner wrote: > > I ran into the following error: > > "An error has occurred: ? Erb processing failed in > styleoverview.en.html>: undefined method `routing_node' for "/ > > style_Dutch.html":String" > > Sorry, my mistake, the Node#link_to method takes a node as you already > found out. > > > > > I browsed the API, and I think for the method call 'link_to > > (style_node)' to work, the variable style_node should contain a node, > > instead of a string, as in the example code you gave? I tried solving > > this by changing the code into > > > <% > > context.content_node.tree['/restaurants'].children.select {|c| c > > ['kind'] == 'page'}. > > collect {|c| c['style']}.uniq.sort.each do |style| > > ? ? ? ?style_node = context.content_node.resolve('/style_' + style.tr > > (' ', '_') + '.html') > > %> > > <%= context.dest_node.link_to(style_node) %> > > <% end %> > > (I manually created nodes with the appropriate page files) > > > but this gives me the error > > "An error has occurred: ? Erb processing failed in > styleoverview.en.html>: undefined method `[]' for nil:NilClass" > > Try this: > > ? ? Listing all styles: > ? ? <% > ? ? context.content_node.tree['/restaurants'].children.select {|c| c['kind'] == 'page'}. > ? ? ? ? ? ? collect {|c| c['style']}.uniq.sort.each do |style| > ? ? ? style_path = '/style_' + style.downcase.tr(' ', '_') + '.html' > ? ? ? style_node = context.ref_node.resolve(style_path, context.content_node.lang) > ? ? %> > ? ? <%= context.dest_node.link_to(style_node) %> > ? ? <% end %> > > The problem was that the call to Node#resolve tried to resolve the path > without a language which naturally failed. After adding the needed > language as second parameter it works. > > -- Thomas > > ps. Sorry for the late answer, been on vacation the last week. > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users From t_leitner at gmx.at Mon Apr 20 13:42:51 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Mon, 20 Apr 2009 19:42:51 +0200 Subject: [webgen-users] Anybody using website templates? Message-ID: <20090420194251.04185520@77.118.181.96.wireless.dyn.drei.com> Hi, I'm currently considering dropping the support for different website templates (two choices at this time: default and project) and the related -t switch for `webgen create` and therefore would like to know: Does anybody use the website template project? Rational: I don't think that many people use it and it is possible to achieve the same thing via website styles only. Another rational: The next version of webgen will most certainly provide a facility for using local or *remote* tar archives (simple ones or gzipped ones). This will make it possibly to create a tar archive of a plugin or a style and provide it via ones website and other uses can use it via a CLI command like: webgen apply http://my.example.com/webgen/blog-plugins.tgz And also: if a style can contain plugins or maybe even a whole website, the word `style` is not approriate anymore, I think. Would it be better to name this something like `package` then? Suggestions?! Would appreciate your opinions on this! -- Thomas From scottm at qualcomm.com Tue Apr 21 23:07:05 2009 From: scottm at qualcomm.com (McClelland, Scott) Date: Tue, 21 Apr 2009 20:07:05 -0700 Subject: [webgen-users] Generate static menus? In-Reply-To: <20090402163526.0dc8b667@77.116.131.168.wireless.dyn.drei.com> References: <049c6dd0-abdd-4dad-b68c-0c6df90f3ef6@p6g2000pre.googlegroups.com> <20090402163526.0dc8b667@77.116.131.168.wireless.dyn.drei.com> Message-ID: <6D8319979BEB3A499B778DF1F2DCD2A844C0B6FD5B@NASANEXMB05.na.qualcomm.com> I was hoping to use submenus to generate navigation similar to the bottom of a google search page, but now I see that that is not an option. <| Gooooogle |> Previous 1 2 3 4 5 Next The only way I could figure out how to do something like this was to manually add the names of the previous and next pages in the .page file, but that seems like a lot of work to do manually. | !images/arrow_5_left.png(previous)!:same_size.html | !images/arrow_5_up.png(back)!:index.html | !images/arrow_5_right.png(next)!:impossible.html | |Previous|Illusions|Next| I suppose I could write a shell script that reads all files in the directory, and generates this info, but I was wondering if webgen had a mechanism for this. I thought I might be able to use the photo gallery, if I can get it to work. - scottm -----Original Message----- From: webgen-users-bounces at rubyforge.org [mailto:webgen-users-bounces at rubyforge.org] On Behalf Of Thomas Leitner Sent: Thursday, April 02, 2009 7:35 AM To: webgen-users at rubyforge.org Subject: Re: [webgen-users] Generate static menus? > I want to stack three horizontal menus on top of each other, and also > define exactly what page will be in each menu. What files and syntax > do I use in webgen to accomplish this? I tried finding the answer here > and in the docs but could not figure it out. > > I would also like to style each menu a bit differently if that is > possible. Actual examples especially appreciated! For generating horizontal menus, use a menu tag like {menu: {nested: false, min_levels: 1, show_current_subtree_only: true}} Also have a look at the documentation for the menu tag at http://webgen.rubyforge.org/documentation/tag/menu.html webgen currently only has the concept of *one* menu. So, the only time when multiple "menu lines" are generated by the above shown tag, is when the currently viewed page is in a sub directory. For example, if you have the following hierarchy: /level1.page /dir1/level2.page /dir1/nesteddir/level3.page And you visit the /dir1/nesteddir/level3.html file, three menu levels are shown: one for the top level, one for the first level and one for the second level. Generating different menus, ie. with different menu items, is currently not possible with the menu tag. You can specify what gets into the menu by using the meta information `in_menu`. Each page that has this meta info set to `true` will get included in the menu. Note that there are different menu trees for different languages. Different styling for different levels can be done by using the CSS classes set on the generated elements - these classes are documented on the documentation page for the menu tag ( http://webgen.rubyforge.org/documentation/tag/menu.html ) -- Thomas _______________________________________________ webgen-users mailing list webgen-users at rubyforge.org http://rubyforge.org/mailman/listinfo/webgen-users From scottm at qualcomm.com Tue Apr 28 21:35:27 2009 From: scottm at qualcomm.com (McClelland, Scott) Date: Tue, 28 Apr 2009 18:35:27 -0700 Subject: [webgen-users] Generate static menus? In-Reply-To: <6D8319979BEB3A499B778DF1F2DCD2A844C0B6FD5B@NASANEXMB05.na.qualcomm.com> References: <049c6dd0-abdd-4dad-b68c-0c6df90f3ef6@p6g2000pre.googlegroups.com> <20090402163526.0dc8b667@77.116.131.168.wireless.dyn.drei.com> <6D8319979BEB3A499B778DF1F2DCD2A844C0B6FD5B@NASANEXMB05.na.qualcomm.com> Message-ID: <6D8319979BEB3A499B778DF1F2DCD2A844C0B706BF@NASANEXMB05.na.qualcomm.com> I guess the subject should be pagination, rather than static menus, but I think this answers part of the original question. I found a better looking way to do pagination with CSS, which is what I was trying to do. I am still looking for ways to automate the process, but it is not too bad to do manually, if there are only a few pages. I am sending all the details of what I have done, in case anyone is interested. Here is the HTML code I use with a CSS style listed below. The results are on http://lifeisnojoke.com/riddles/, and I plan to add this to other pages, and probably other sites. I had to use "<<", and ">>" instead of the ASCII codes 174 and 175, because they did not translate properly from the page file, but it still looks fine. It also works fine with the markup for
  • to save a little typing. Here is a style I found for pagination. Apparently it was inspired by the pagination used at http://digg.com This is where I found the CSS code. http://www.dynamicdrive.com/style/csslibrary/item/css_pagination_links/ In order to use this, I saved the above css code to buttons.css, and added a line to default.template: Then running webgen gave me nice pagination at the bottom of the page, but I had to manually modify each .page file to put in the correct links. - scottm -----Original Message----- From: webgen-users-bounces at rubyforge.org [mailto:webgen-users-bounces at rubyforge.org] On Behalf Of McClelland, Scott Sent: Tuesday, April 21, 2009 8:07 PM To: Thomas Leitner; webgen-users at rubyforge.org Subject: Re: [webgen-users] Generate static menus? I was hoping to use submenus to generate navigation similar to the bottom of a google search page, but now I see that that is not an option. <| Gooooogle |> Previous 1 2 3 4 5 Next The only way I could figure out how to do something like this was to manually add the names of the previous and next pages in the .page file, but that seems like a lot of work to do manually. | !images/arrow_5_left.png(previous)!:same_size.html | !images/arrow_5_up.png(back)!:index.html | !images/arrow_5_right.png(next)!:impossible.html | |Previous|Illusions|Next| I suppose I could write a shell script that reads all files in the directory, and generates this info, but I was wondering if webgen had a mechanism for this. I thought I might be able to use the photo gallery, if I can get it to work. - scottm -----Original Message----- From: webgen-users-bounces at rubyforge.org [mailto:webgen-users-bounces at rubyforge.org] On Behalf Of Thomas Leitner Sent: Thursday, April 02, 2009 7:35 AM To: webgen-users at rubyforge.org Subject: Re: [webgen-users] Generate static menus? > I want to stack three horizontal menus on top of each other, and also > define exactly what page will be in each menu. What files and syntax > do I use in webgen to accomplish this? I tried finding the answer here > and in the docs but could not figure it out. > > I would also like to style each menu a bit differently if that is > possible. Actual examples especially appreciated! For generating horizontal menus, use a menu tag like {menu: {nested: false, min_levels: 1, show_current_subtree_only: true}} Also have a look at the documentation for the menu tag at http://webgen.rubyforge.org/documentation/tag/menu.html webgen currently only has the concept of *one* menu. So, the only time when multiple "menu lines" are generated by the above shown tag, is when the currently viewed page is in a sub directory. For example, if you have the following hierarchy: /level1.page /dir1/level2.page /dir1/nesteddir/level3.page And you visit the /dir1/nesteddir/level3.html file, three menu levels are shown: one for the top level, one for the first level and one for the second level. Generating different menus, ie. with different menu items, is currently not possible with the menu tag. You can specify what gets into the menu by using the meta information `in_menu`. Each page that has this meta info set to `true` will get included in the menu. Note that there are different menu trees for different languages. Different styling for different levels can be done by using the CSS classes set on the generated elements - these classes are documented on the documentation page for the menu tag ( http://webgen.rubyforge.org/documentation/tag/menu.html ) -- Thomas _______________________________________________ webgen-users mailing list webgen-users at rubyforge.org http://rubyforge.org/mailman/listinfo/webgen-users _______________________________________________ webgen-users mailing list webgen-users at rubyforge.org http://rubyforge.org/mailman/listinfo/webgen-users From mk at fsfe.org Wed Apr 29 03:45:28 2009 From: mk at fsfe.org (Matthias Kirschner) Date: Wed, 29 Apr 2009 09:45:28 +0200 Subject: [webgen-users] Anybody using website templates? In-Reply-To: <20090420194251.04185520@77.118.181.96.wireless.dyn.drei.com> References: <20090420194251.04185520@77.118.181.96.wireless.dyn.drei.com> Message-ID: <20090429074528.GC4923@mbwg.de> Hi Thomas, * Thomas Leitner [2009-04-20 19:42:51 +0200]: > Does anybody use the website template project? I once did when I first tested webgen. After that never again. > Rational: I don't think that many people use it and it is possible to > achieve the same thing via website styles only. I think that is a good point. And I would have no problem if you drop the website templates. > Another rational: The next version of webgen will most certainly > provide a facility for using local or *remote* tar archives (simple > ones or gzipped ones). This will make it possibly to create a tar > archive of a plugin or a style and provide it via ones website and > other uses can use it via a CLI command like: > > webgen apply http://my.example.com/webgen/blog-plugins.tgz > > And also: if a style can contain plugins or maybe even a whole website, > the word `style` is not approriate anymore, I think. Would it be better > to name this something like `package` then? Suggestions?! Package or if you decide to drop the templates above you can call it templates ;) Best wishes, Matthias -- Join the Fellowship and protect your freedom! (http://www.fsfe.org) From stian at fsfeurope.org Wed Apr 29 06:45:12 2009 From: stian at fsfeurope.org (Stian =?iso-8859-1?q?R=F8dven_Eide?=) Date: Wed, 29 Apr 2009 12:45:12 +0200 Subject: [webgen-users] How to start with an exclamation mark Message-ID: <200904291245.14617.stian@fsfeurope.org> On pdfreaders.org we have a custom tag HeaderTitle which is unique for every translation. There seems, however, to be a problem with the Spanish version since it starts with an exclamation mark. Instead of the tag, the header title now reads #. You can see the issue live at http://pdfreaders.org/index.es.html Is there an easy way to solve this, or is the best option to remove the exclamation mark from the Spanish translation? all the best, /Stian From t_leitner at gmx.at Wed Apr 29 09:02:28 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Wed, 29 Apr 2009 15:02:28 +0200 Subject: [webgen-users] Anybody using website templates? In-Reply-To: <20090429074528.GC4923@mbwg.de> References: <20090420194251.04185520@77.118.181.96.wireless.dyn.drei.com> <20090429074528.GC4923@mbwg.de> Message-ID: <20090429150228.679c9d25@77.118.181.96.wireless.dyn.drei.com> > I think that is a good point. And I would have no problem if you drop > the website templates. Already dropped in my local repository. > > And also: if a style can contain plugins or maybe even a whole > > website, the word `style` is not approriate anymore, I think. Would > > it be better to name this something like `package` then? > > Suggestions?! > > Package or if you decide to drop the templates above you can call it > templates ;) I went with 'bundle', so we now have website bundles, style bundles, ... Will be in the next release. -- Thomas From t_leitner at gmx.at Wed Apr 29 11:59:03 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Wed, 29 Apr 2009 17:59:03 +0200 Subject: [webgen-users] How to start with an exclamation mark In-Reply-To: <200904291245.14617.stian@fsfeurope.org> References: <200904291245.14617.stian@fsfeurope.org> Message-ID: <20090429175903.3e6f2748@77.118.181.96.wireless.dyn.drei.com> > On pdfreaders.org we have a custom tag HeaderTitle which is unique > for every translation. > > There seems, however, to be a problem with the Spanish version since > it starts with an exclamation mark. Instead of the tag, the header > title now reads #. You can see the issue > live at http://pdfreaders.org/index.es.html > > Is there an easy way to solve this, or is the best option to remove > the exclamation mark from the Spanish translation? This most certainly comes from webgen parsing the exclamation mark as YAML type. You didn't say where the part with the exclamation mark was put, but if it is something like {HeaderTitle: !Hola!} or if it is defined in the meta information for a page file, you have to know that everything after the colon is parsed by YAML (and the meta information block of a page file is in YAML format). You can overcome this issue by using quotes, for example: {HeaderTitle: "!Hola!"} Let me know if this helps! Best regards, Thomas From stian at fsfeurope.org Thu Apr 30 05:32:57 2009 From: stian at fsfeurope.org (Stian =?iso-8859-1?q?R=F8dven_Eide?=) Date: Thu, 30 Apr 2009 11:32:57 +0200 Subject: [webgen-users] How to start with an exclamation mark In-Reply-To: <20090429175903.3e6f2748@77.118.181.96.wireless.dyn.drei.com> References: <200904291245.14617.stian@fsfeurope.org> <20090429175903.3e6f2748@77.118.181.96.wireless.dyn.drei.com> Message-ID: <200904301132.59195.stian@fsfeurope.org> From Thomas Leitner, 2009-04-29: > > On pdfreaders.org we have a custom tag HeaderTitle which is unique > > for every translation. > > > > There seems, however, to be a problem with the Spanish version since > > it starts with an exclamation mark. Instead of the tag, the header > > title now reads #. You can see the issue > > live at http://pdfreaders.org/index.es.html > > > > Is there an easy way to solve this, or is the best option to remove > > the exclamation mark from the Spanish translation? > > This most certainly comes from webgen parsing the exclamation mark as > YAML type. You didn't say where the part with the exclamation mark was > put, but if it is something like > > {HeaderTitle: !Hola!} > > or if it is defined in the meta information for a page file, you have to > know that everything after the colon is parsed by YAML (and the meta > information block of a page file is in YAML format). > > You can overcome this issue by using quotes, for example: > > {HeaderTitle: "!Hola!"} > > Let me know if this helps! The tag is defined in the meta info block, but the quotes certainly did the trick. Thanks a lot, Thomas. all the best, /Stian From franzl at corporatematters.at Thu Apr 30 11:28:01 2009 From: franzl at corporatematters.at (Michael Franzl) Date: Thu, 30 Apr 2009 17:28:01 +0200 Subject: [webgen-users] General Webgen Suggestion/Question Message-ID: <49F9C381.5080006@corporatematters.at> Hi, it would be nice if webgen could implement Umlauts (or even Spaces) in path- or filenames. How could this problem be solved in webgen: |-DirA | |-index.page in_menu: false | |-file1.page in_menu: true | |-file2.page in_menu: true | |-DirB |-index.page in_menu: XXX The following menu should be created: DirA File1 File2 DirB But it seems this is not possible. Dependent on the value of 'XXX' above, the following two situations can occur: 1. DirB is not displayed at all 2. DirB is displayed together with 'Index' in its submenu This is in most real-world sites not a desired outcome. Sometimes there are simply no submenu items, but nevertheless there should just be the contents of index.page displayed -- only without menu entry. Would it be possible to make index.page a special filename that won't be displayed in the menu, even when 'in_menu: true' is selected? Thanks, Michael