From t_leitner at gmx.at Tue Sep 1 01:24:42 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Tue, 1 Sep 2009 07:24:42 +0200 Subject: [webgen-users] 0.5.10 breakage In-Reply-To: References: <20090824083020.415cc540@noeato.local> Message-ID: <20090901072442.135db443@noeato.mat.univie.ac.at> Am Mon, 31 Aug 2009 16:38:43 +0000 (UTC) schrieb Tuomo Valkonen : > On 2009-08-24, Tuomo Valkonen wrote: > >>> Error while creating a node from with > >>> Webgen::SourceHandler::Virtual: > >>> can't convert Webgen::Node into String > >>> /usr/lib/ruby/gems/1.8/gems/webgen-0.5.10/lib/webgen/sourcehandler/virtual.rb:74:in > >>> `join' /usr/lib/ruby/gems/1.8/gems/webgen-0.5.10/lib/webgen/sourcehandler/virtual.rb:74:in > >>> `create_directories' ... > >> > >> Does this error still occur after you have deleted the cache file > >> and run webgen again? > > > > Yes. > > Adding a 'return' statement in the iterated function or whatever > (I don't know the ruby terminology or ruby much) seems to fix this. > It seems that returning parent (Node) from the iterated function > confuses iterator. > > def create_directories(dirname, path) > parent = website.tree.root > dirname.sub(/^\//, '').split('/').inject('/') do |parent_path, > dir| pp = File.join(parent_path, dir) > parent = create_directory(pp, path) > return # <---- THIS > end > parent > end That does only seem to fix the error as return will return from the entiry method and not only from one iterator run. I have fixed this now, you just have to change `return` to `parent_path`. Best regards, Thomas From lupino.monaco at muenchen-mail.de Mon Sep 7 14:23:38 2009 From: lupino.monaco at muenchen-mail.de (lupino12) Date: Mon, 7 Sep 2009 11:23:38 -0700 (PDT) Subject: [webgen-users] orderInfo is ignored Message-ID: <481f6f15-0728-4f5b-b43d-9fcc1dcd72e3@z30g2000yqz.googlegroups.com> Hi, after creating a fresh webgen site directory and adding a couple of files, the orderInfo in the meta section of the files is happily ignored. I did not make any changes in default.template. No metainfo.yaml is present. The meta sections of my files look like: --- title: About me in_menu: true orderInfo: 30 --- No subdirectories or other "complex" things, just the src dir and some files below it. I do hope, that orderInfo: is the right keyword to order menu items, though... Any help is appreciated. Uli From t_leitner at gmx.at Tue Sep 8 01:11:22 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Tue, 8 Sep 2009 07:11:22 +0200 Subject: [webgen-users] orderInfo is ignored In-Reply-To: <481f6f15-0728-4f5b-b43d-9fcc1dcd72e3@z30g2000yqz.googlegroups.com> References: <481f6f15-0728-4f5b-b43d-9fcc1dcd72e3@z30g2000yqz.googlegroups.com> Message-ID: <20090908071122.02d89619@noeato.local> Hi, > after creating a fresh webgen site directory and adding a couple of > files, the orderInfo in the meta section of the files is happily > ignored. I did not make any changes in default.template. No > metainfo.yaml is present. > > The meta sections of my files look like: > > --- > title: About me > in_menu: true > orderInfo: 30 > --- > > No subdirectories or other "complex" things, just the src dir and some > files below it. I do hope, that orderInfo: is the right keyword to > order menu items, though... Which version of webgen are you using? The names of some meta information keys have changed between the 0.4.x and the 0.5.x series, see http://webgen.rubyforge.org/documentation/upgrading.html orderInfo is now called sort_info. So you just need to replace that in your files and everything should work fine. Best regards, Thomas From tuomov at iki.fi Tue Sep 8 04:00:30 2009 From: tuomov at iki.fi (Tuomo Valkonen) Date: Tue, 8 Sep 2009 08:00:30 +0000 (UTC) Subject: [webgen-users] Relocatable-tag and index.html References: <20090819193204.6d4fcf2f@noeato.local> Message-ID: On 2009-08-27, Tuomo Valkonen wrote: > The following hacks seem to do what I want. > Any chances of getting them in, configurable? So, what is the status of the index.html hiding issue? I'd like to know so I can decide whether I can be bothered to convert a site to webgen, and how... (without hiding, using topic/index.html instead of topic.html seems quite pointless). -- Tuomo From t_leitner at gmx.at Tue Sep 8 05:06:03 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Tue, 8 Sep 2009 11:06:03 +0200 Subject: [webgen-users] Relocatable-tag and index.html In-Reply-To: References: <20090819193204.6d4fcf2f@noeato.local> Message-ID: <20090908110603.0e9fc9c4@noeato.local> > So, what is the status of the index.html hiding issue? > I'd like to know so I can decide whether I can be bothered > to convert a site to webgen, and how... (without hiding, > using topic/index.html instead of topic.html seems quite > pointless). Didn't and don't have time to look through this or implement it. If your hack works, go with it. -- Thomas From tuomov at iki.fi Tue Sep 8 05:17:05 2009 From: tuomov at iki.fi (Tuomo Valkonen) Date: Tue, 8 Sep 2009 09:17:05 +0000 (UTC) Subject: [webgen-users] Relocatable-tag and index.html References: <20090819193204.6d4fcf2f@noeato.local> <20090908110603.0e9fc9c4@noeato.local> Message-ID: On 2009-09-08, Thomas Leitner wrote: >> So, what is the status of the index.html hiding issue? >> I'd like to know so I can decide whether I can be bothered >> to convert a site to webgen, and how... (without hiding, >> using topic/index.html instead of topic.html seems quite >> pointless). > > Didn't and don't have time to look through this or implement it. If your > hack works, go with it. I'm primarily interested in knowing if the feature (implemented this way or otherwise) will be there in future releases, so I don't have to maintain my own fork. (I'm not actually sure index_path is the right way to do things in my hack, and whether things work "right" on multilingual pages... but it works for me, and it seems like something like link_path is needed in any case.) From lupino.monaco at muenchen-mail.de Tue Sep 8 08:35:25 2009 From: lupino.monaco at muenchen-mail.de (lupino12) Date: Tue, 8 Sep 2009 05:35:25 -0700 (PDT) Subject: [webgen-users] orderInfo is ignored In-Reply-To: <20090908071122.02d89619@noeato.local> References: <481f6f15-0728-4f5b-b43d-9fcc1dcd72e3@z30g2000yqz.googlegroups.com> <20090908071122.02d89619@noeato.local> Message-ID: Thx Thomas, that was the reason. On Sep 8, 7:11?am, Thomas Leitner wrote: > Hi, > > > > > after creating a fresh webgen site directory and adding a couple of > > files, the orderInfo in the meta section of the files is happily > > ignored. I did not make any changes in default.template. No > > metainfo.yaml is present. > > > The meta sections of my files look like: > > > --- > > title: About me > > in_menu: true > > orderInfo: 30 > > --- > > > No subdirectories or other "complex" things, just the src dir and some > > files below it. I do hope, that orderInfo: is the right keyword to > > order menu items, though... > > Which version of webgen are you using? The names of some meta > information keys have changed between the 0.4.x and the 0.5.x series, > seehttp://webgen.rubyforge.org/documentation/upgrading.html > > orderInfo is now called sort_info. So you just need to replace that in > your files and everything should work fine. > > Best regards, > ? Thomas > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users From tnewton at gmail.com Tue Sep 8 19:33:07 2009 From: tnewton at gmail.com (Thomas Newton) Date: Tue, 8 Sep 2009 16:33:07 -0700 (PDT) Subject: [webgen-users] Extensions not loading properly in 0.5.10 Message-ID: <0c957609-e50a-45a2-a288-a195b73850b0@w10g2000yqf.googlegroups.com> Hi, I was using webgen 0.5.8 and recently upgraded to 0.5.10. I am loading some of my own extensions in the init.rb like so: require File.join(File.dirname(__FILE__), 'extension_one') require File.join(File.dirname(__FILE__), 'extension_two') This worked fine in 0.5.8, when I execute webgen in 0.5.10 I get errors like: ERROR -- No value for meta info key 'extension_one' in found in Which tells me they are getting overwritten or not loading. I put a simple puts in the init.rb and the extension classes and noticed it does print out twice on the init puts: Loading Extensions.... Loading Extension One.... Loading Extension Two End Loading Extensions.... <--- calling init.rb again? Loading Extensions.... End Loading Extensions.... Starting webgen... Updating tree... If I run: webgen _0.5.8_ I get: Loading Extensions.... Loading Extension One.... Loading Extension Two End Loading Extensions.... Starting webgen... Updating tree... And all my extensions load and I get no errors. Looking into it, but any help would be appreciated. Cheers! -Thomas From tnewton at gmail.com Tue Sep 8 21:03:14 2009 From: tnewton at gmail.com (Thomas Newton) Date: Tue, 8 Sep 2009 18:03:14 -0700 (PDT) Subject: [webgen-users] Extensions not loading properly in 0.5.10 In-Reply-To: <0c957609-e50a-45a2-a288-a195b73850b0@w10g2000yqf.googlegroups.com> References: <0c957609-e50a-45a2-a288-a195b73850b0@w10g2000yqf.googlegroups.com> Message-ID: In the Website class it looks like the render method no longer has a check to call init if @config already exists. If I add the check in 0.5.10 the extensions get loaded. _0.5.8_ init unless @config _0.5.10_ init On Sep 8, 7:33?pm, Thomas Newton wrote: > Hi, > > I was using webgen 0.5.8 and recently upgraded to 0.5.10. ?I am > loading some of my own extensions in the init.rb like so: > > require File.join(File.dirname(__FILE__), 'extension_one') > require File.join(File.dirname(__FILE__), 'extension_two') > > This worked fine in 0.5.8, when I execute webgen in 0.5.10 I get > errors like: > > ERROR -- No value for meta info key 'extension_one' in index.en.html> found in > > Which tells me they are getting overwritten or not loading. ?I put a > simple puts in the init.rb and the extension classes and noticed it > does print out twice on the init puts: > > Loading Extensions.... > Loading Extension One.... > Loading Extension Two > End Loading Extensions.... ?<--- calling init.rb again? > Loading Extensions.... > End Loading Extensions.... > Starting webgen... > Updating tree... > > If I run: webgen _0.5.8_ ? I get: > > Loading Extensions.... > Loading Extension One.... > Loading Extension Two > End Loading Extensions.... > Starting webgen... > Updating tree... > > And all my extensions load and I get no errors. ?Looking into it, but > any help would be appreciated. > > Cheers! > > -Thomas > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users From nirusuma at gmail.com Tue Sep 8 11:20:12 2009 From: nirusuma at gmail.com (Niranjan) Date: Tue, 8 Sep 2009 08:20:12 -0700 (PDT) Subject: [webgen-users] Including a helper file in template file Message-ID: <8f4cd334-c03d-4962-89fa-67e6668fc5f8@s31g2000yqs.googlegroups.com> Hi, Is there any way by which we can include some helper file in a template ? The helper file contains nothing but ruby helper methods which can be directly used in the erb in the template. Thanks, Niranjan From nirusuma at gmail.com Tue Sep 8 11:15:25 2009 From: nirusuma at gmail.com (Niranjan) Date: Tue, 8 Sep 2009 08:15:25 -0700 (PDT) Subject: [webgen-users] Getting problem in loading the webgen tag extensions on windows and mac machine Message-ID: <2330d337-706b-4ec3-8f41-60581c98fb2d@38g2000yqr.googlegroups.com> Hi, I am developing some custom tags with webgen. and included this tag in one of the page files as :- {largethumbnail: {source: '../../images/myimage.gif', width: 265}} e.g. -------------------------------------------- class LargeThumbnail include Webgen::Tag::Base def call(tag, body, context) .... some html code here end end website = Webgen::WebsiteAccess.website config = website.config config['contentprocessor.tags.map']['largethumbnail'] = 'LargeThumbnail' config.largethumbnail.source(nil, :mandatory => 'default') config.largethumbnail.width(nil) ------------------------------------------------------- And also including this in ext\init.rb file as :- require File.join(File.dirname(__FILE__), 'large_thumbnail') However, I get the below error on my windows and mac machine: WARN -- Invalid parameter 'source' for tag 'Webgen::Tag::Metainfo' in WARN -- Invalid parameter 'width' for tag 'Webgen::Tag::Metainfo' in ERROR -- No value for meta info key 'largethumbnail' in found in Basically it is not able to load the extension file. It is always looking for the default 'Webgen::Tag::Metainfo' I tried to debug whether it is getting proper paths in envt variables, but did not work. I have ruby 1.8.5 installed on my windows machine. Would really appreciate your help on this. Thanks in advance... Best Regards, Niranjan From nirusuma at gmail.com Wed Sep 9 10:02:53 2009 From: nirusuma at gmail.com (Niranjan) Date: Wed, 9 Sep 2009 07:02:53 -0700 (PDT) Subject: [webgen-users] Including a helper file in template file In-Reply-To: <8f4cd334-c03d-4962-89fa-67e6668fc5f8@s31g2000yqs.googlegroups.com> References: <8f4cd334-c03d-4962-89fa-67e6668fc5f8@s31g2000yqs.googlegroups.com> Message-ID: <5985f2c2-1383-46b5-83a4-81a07b13e19e@y21g2000yqn.googlegroups.com> Hello, I got this worked by extending Webgen::ContentProcessor::Erb class. Added ruby methods to this class and required this file in ext\init.rb of webgen :-) Now my templates can access these methods in the erb section. Thanks, Niranjan On Sep 8, 8:20?pm, Niranjan wrote: > Hi, > > Is there any way by which we can include some helper file in a > template ? > > The helper file contains nothing but ruby helper methods which can be > directly used in the erb in the template. > > Thanks, > Niranjan > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users From t_leitner at gmx.at Thu Sep 10 01:29:58 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Thu, 10 Sep 2009 07:29:58 +0200 Subject: [webgen-users] Including a helper file in template file In-Reply-To: <5985f2c2-1383-46b5-83a4-81a07b13e19e@y21g2000yqn.googlegroups.com> References: <8f4cd334-c03d-4962-89fa-67e6668fc5f8@s31g2000yqs.googlegroups.com> <5985f2c2-1383-46b5-83a4-81a07b13e19e@y21g2000yqn.googlegroups.com> Message-ID: <20090910072958.485d2732@noeato.local> Hi, > I got this worked by extending Webgen::ContentProcessor::Erb class. > > Added ruby methods to this class and required this file in ext\init.rb > of webgen :-) > > Now my templates can access these methods in the erb section. the proposed although currently not documented way is to * require 'webgen/context' * add the needed methods in the Webgen::Context class This is more useful because then the helper methods are available on the context object which itself is available to all content processors. Therefore you would be able to use the methods even if you decide to switch to erubis for speed later. Having said that your approach is certainly valid and the way to go when you want to extend the functionality of the shipped classes. -- Thomas From t_leitner at gmx.at Thu Sep 10 01:33:33 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Thu, 10 Sep 2009 07:33:33 +0200 Subject: [webgen-users] Getting problem in loading the webgen tag extensions on windows and mac machine In-Reply-To: <2330d337-706b-4ec3-8f41-60581c98fb2d@38g2000yqr.googlegroups.com> References: <2330d337-706b-4ec3-8f41-60581c98fb2d@38g2000yqr.googlegroups.com> Message-ID: <20090910073333.243b2c07@noeato.local> Hi, > -------------------------------------------- > class LargeThumbnail > > include Webgen::Tag::Base > > def call(tag, body, context) > .... some html code here > end > > end > > website = Webgen::WebsiteAccess.website > config = website.config > > config['contentprocessor.tags.map']['largethumbnail'] = > 'LargeThumbnail' > config.largethumbnail.source(nil, :mandatory => 'default') > config.largethumbnail.width(nil) > ------------------------------------------------------- > > And also including this in ext\init.rb file as :- > > require File.join(File.dirname(__FILE__), 'large_thumbnail') the basic problem is that if you require the file, it is only required once. However, due to how webgen works the initialisation process is sometimes done twice. The first time the large_thumbnail.rb file gets required and the configuration stored in the config variable. However, the second time Ruby sees that the file has already been required and does not require it again, therefore the config variable is not populated. You can circumvent this problem by * either using `load` instead of `require` * or just defining the class in the large_thumbnail.rb file and doing the configuration stuff in init.rb. The second way is how webgen does it interally. All the functionality is split into different files and the configuration takes place in one central file called lib/webgen/default_config.rb. -- Thomas From t_leitner at gmx.at Thu Sep 10 01:40:29 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Thu, 10 Sep 2009 07:40:29 +0200 Subject: [webgen-users] Extensions not loading properly in 0.5.10 In-Reply-To: References: <0c957609-e50a-45a2-a288-a195b73850b0@w10g2000yqf.googlegroups.com> Message-ID: <20090910074029.7ba6728d@noeato.local> Hi, > In the Website class it looks like the render method no longer has a > check to call init if @config already exists. If I add the check in > 0.5.10 the extensions get loaded. > > _0.5.8_ init unless @config > _0.5.10_ init this change was introduced in June 2009 in the commit f47233e823f44c10b6f7687751dd71c98cf1d651. The reason for `init` being called unconditionally is that when webgen is used by a program as a library there would be errors if the `render` method was called more than once. Therefore there the initialisation is forced. Since an `init` call alone does nothing but setup the needed environment, this is safe. You can circumvent the problem by * either using `load` instead of `require` * or just defining the class in the required file and doing the configuration stuff in init.rb. Load does not check if the file is already loaded, so it loads the same file over and over again just fine. The second way is how webgen does it interally. All the functionality is split into different files and the configuration takes place in one central file called lib/webgen/default_config.rb. -- Thomas From tnewton at gmail.com Sat Sep 12 21:12:31 2009 From: tnewton at gmail.com (Thomas Newton) Date: Sat, 12 Sep 2009 18:12:31 -0700 (PDT) Subject: [webgen-users] Extensions not loading properly in 0.5.10 In-Reply-To: <20090910074029.7ba6728d@noeato.local> References: <0c957609-e50a-45a2-a288-a195b73850b0@w10g2000yqf.googlegroups.com> <20090910074029.7ba6728d@noeato.local> Message-ID: <01c33816-5faa-41a5-9431-f7038f4b60af@o9g2000yqj.googlegroups.com> Thanks for the help and tips Thomas! On Sep 10, 1:40?am, Thomas Leitner wrote: > Hi, > > > In the Website class it looks like the render method no longer has a > > check to call init if @config already exists. ?If I add the check in > > 0.5.10 the extensions get loaded. > > > _0.5.8_ ? init unless @config > > _0.5.10_ ?init > > this change was introduced in June 2009 in the commit > f47233e823f44c10b6f7687751dd71c98cf1d651. > > The reason for `init` being called unconditionally is that when webgen > is used by a program as a library there would be errors if the `render` > method was called more than once. Therefore there the initialisation is > forced. > > Since an `init` call alone does nothing but setup the needed > environment, this is safe. > > You can circumvent the problem by > > * either using `load` instead of `require` > * or just defining the class in the required file and doing > ? the configuration stuff in init.rb. > > Load does not check if the file is already loaded, so it loads the same > file over and over again just fine. > > The second way is how webgen does it interally. All the functionality > is split into different files and the configuration takes place in one > central file called lib/webgen/default_config.rb. > > -- Thomas > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users From nirusuma at gmail.com Tue Sep 15 12:48:59 2009 From: nirusuma at gmail.com (Niranjan) Date: Tue, 15 Sep 2009 09:48:59 -0700 (PDT) Subject: [webgen-users] Including a helper file in template file In-Reply-To: <20090910072958.485d2732@noeato.local> References: <8f4cd334-c03d-4962-89fa-67e6668fc5f8@s31g2000yqs.googlegroups.com> <5985f2c2-1383-46b5-83a4-81a07b13e19e@y21g2000yqn.googlegroups.com> <20090910072958.485d2732@noeato.local> Message-ID: <6e11a89a-0853-47f2-9993-4df266532187@h40g2000prf.googlegroups.com> Thanks Thomas ! I will try out your proposed solution. Regards, Niranjan On Sep 10, 10:29?am, Thomas Leitner wrote: > Hi, > > > I got this worked by extending Webgen::ContentProcessor::Erb class. > > > Added ruby methods to this class and required this file in ext\init.rb > > of webgen :-) > > > Now my templates can access these methods in the erb section. > > the proposed although currently not documented way is to > > * require 'webgen/context' > * add the needed methods in the Webgen::Context class > > This is more useful because then the helper methods are available on > the context object which itself is available to all content processors. > Therefore you would be able to use the methods even if you decide to > switch to erubis for speed later. > > Having said that your approach is certainly valid and the way to go > when you want to extend the functionality of the shipped classes. > > -- Thomas > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users From nirusuma at gmail.com Tue Sep 15 12:52:33 2009 From: nirusuma at gmail.com (Niranjan) Date: Tue, 15 Sep 2009 09:52:33 -0700 (PDT) Subject: [webgen-users] Getting problem in loading the webgen tag extensions on windows and mac machine In-Reply-To: <20090910073333.243b2c07@noeato.local> References: <2330d337-706b-4ec3-8f41-60581c98fb2d@38g2000yqr.googlegroups.com> <20090910073333.243b2c07@noeato.local> Message-ID: <9f0415d2-b051-4e91-8111-f74e60796728@f18g2000prf.googlegroups.com> Thanks Thomas ! Best Regards, Niranjan On Sep 10, 10:33?am, Thomas Leitner wrote: > Hi, > > > > > > > -------------------------------------------- > > class LargeThumbnail > > > ? include Webgen::Tag::Base > > > ? def call(tag, body, context) > > ? ? ? ? .... some html code here > > ? end > > > end > > > website = Webgen::WebsiteAccess.website > > config ?= website.config > > > config['contentprocessor.tags.map']['largethumbnail'] = > > 'LargeThumbnail' > > config.largethumbnail.source(nil, :mandatory => 'default') > > config.largethumbnail.width(nil) > > ------------------------------------------------------- > > > And also including this in ext\init.rb file as :- > > > require File.join(File.dirname(__FILE__), 'large_thumbnail') > > the basic problem is that if you require the file, it is only required > once. However, due to how webgen works the initialisation process is > sometimes done twice. The first time the large_thumbnail.rb file gets > required and the configuration stored in the config variable. However, > the second time Ruby sees that the file has already been required and > does not require it again, therefore the config variable is not > populated. > > You can circumvent this problem by > > * either using `load` instead of `require` > * or just defining the class in the large_thumbnail.rb file and doing > ? the configuration stuff in init.rb. > > The second way is how webgen does it interally. All the functionality > is split into different files and the configuration takes place in one > central file called lib/webgen/default_config.rb. > > -- Thomas > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users- Hide quoted text - > > - Show quoted text - From Christian.Packmann at gmx.de Wed Sep 16 11:30:39 2009 From: Christian.Packmann at gmx.de (Christian Packmann) Date: Wed, 16 Sep 2009 17:30:39 +0200 Subject: [webgen-users] Menus: how to suppress section index Message-ID: <4AB1049F.8040400@gmx.de> Hi, I'm doing my first tests with webgen. I'm currently stuck with a menu problem. I have a multi-level menu: Home Section1 Page1.1 Page1.2 Section2 Page2.1 ...etc... How can I turn off generation of .html for the section headings, so that only text is generated for the sections, while each page within a section is a link? From t_leitner at gmx.at Thu Sep 17 07:00:50 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Thu, 17 Sep 2009 13:00:50 +0200 Subject: [webgen-users] Menus: how to suppress section index In-Reply-To: <4AB1049F.8040400@gmx.de> References: <4AB1049F.8040400@gmx.de> Message-ID: <20090917130050.2747c4d2@noeato.local> Hi, > I'm doing my first tests with webgen. I'm currently stuck with a menu > problem. I have a multi-level menu: > > Home > Section1 > Page1.1 > Page1.2 > Section2 > Page2.1 > ...etc... > > How can I turn off generation of .html for the section headings, so > that only text is generated for the sections, while each page within > a section is a link? Okay, if I understand correctly, you want the section headings Section1, Section2, ... to be plain text, not HTML links, but the pages themselves should be HTML links to the pages. This is currently not possible with the way webgen generates a menu by using the menu tag. It is only possible to make the currently active menu item plain text instead of an HTML link. -- Thomas From Damien.Robert at loria.fr Thu Sep 17 09:46:43 2009 From: Damien.Robert at loria.fr (Damien Robert) Date: Thu, 17 Sep 2009 15:46:43 +0200 Subject: [webgen-users] Metainformation depending on the langage Message-ID: <20090917134642.GC27465@genoise.loria.fr> Hello everyone. 1) A question: I am wondering, is there a way to specify a meta information according to the langage? To give an example, i have a site www that is both in french and in english. Inside this site, the directory www/french contains pages only in french. So i would like two meta-infos: --- french /french/ in_menu: true --- english /french/ in_menu: false index_path: ~ #To get rid of the warning there is no index.en.html But i didn't find how to specify such metainfo since directory are not localized. I tried to create a file metainfo.en, metainfo.fr, but they are not read (i think). My current solution is to create a virtual /french/index.en.html that links to /french/index.fr.html 2) A feature request: To continue with the same example, suppose i have only a file index.fr.html in /french/. I don't wont the menu to be /french/index.fr.html (this is a bit redondant), so i set in_menu: false for /french/index.fr.html However, since this is the only file in /french/ i have to set a metainfo file: /french/ in_menu: true It would be more convienent to have an option to specify this directly in index.fr.html, like routed_title: --- in_menu: false routed_title: fran?ais routed_in_menu: true Could it be possible to implement this (i may try to produce a patch if you haven't the time) 3) Another feature request In the langbar (with the current_lang option set to true), could it be possible to put a class="webgen-current-lang" for the current lang? (to highlight it with css after) 4) I think i saw one of your mail where you said you were working on a new content processor. Are you still working on it? I would be interested in trying an alpha-version. Maruku is quite bugged (indentations for list and for word list behave differently), and Redcloth doesn't support mathml. Thanks a lot! -- Damien Robert http://www.normalesup.org/~robert/ (a website generated by the wonderfull webgen program ;)) From sebastien-mengin at edilibre.net Sat Sep 19 05:08:39 2009 From: sebastien-mengin at edilibre.net (=?ISO-8859-1?Q?S=E9bastien?= Mengin) Date: Sat, 19 Sep 2009 11:08:39 +0200 Subject: [webgen-users] installing webgen Message-ID: <1253351319.4828.4.camel@seb-laptop> Hi, I would like to install webgen following the tutorial found at http://webgen.rubyforge.org/installation.html Once I've done sudo aptitude install ruby rubygems sudo gem1.8 install webgen it successfully installs everything needed but I can't launch webgen at the command line. I am on ubuntu jaunty. Is there a step I'm missing? Thanks for any help, -- S?bastien Mengin Edilibre.net -- ?dition et logiciels libres www.edilibre.net From t_leitner at gmx.at Sat Sep 19 06:54:25 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Sat, 19 Sep 2009 12:54:25 +0200 Subject: [webgen-users] Metainformation depending on the langage In-Reply-To: <20090917134642.GC27465@genoise.loria.fr> References: <20090917134642.GC27465@genoise.loria.fr> Message-ID: <20090919125425.17ebbc52@noeato.local> > 1) A question: > > I am wondering, is there a way to specify a meta information > according to the langage? Since only files can be localized, you can set meta information on the localized files, for example, on index.en.html and index.fr.html. Since these are two different files, you can set different meta information for them. > To give an example, i have a site www that is both in french and in > english. Inside this site, the directory www/french contains pages > only in french. So i would like two meta-infos: > > --- french > /french/ > in_menu: true > > --- english > /french/ > in_menu: false > index_path: ~ #To get rid of the warning there is no index.en.html > > But i didn't find how to specify such metainfo since directory are not > localized. I tried to create a file metainfo.en, metainfo.fr, but > they are not read (i think). > > My current solution is to create a virtual /french/index.en.html that > links to /french/index.fr.html You wouldn't use this setup when using webgen. Normally, you just have the index.en.page and index.fr.page files in the src/ directory side-by-side. You don't need to create an extra directory called french/ or english/. In your example, why do you need a virtual /french/index.en.html file in the french/ directory? At the beginning you said that the french/ directory contains only french pages... Could you explain your example a bit more? Concerning webgen menus created by the menu tag: such menus are always localized, ie. english pages only appear in the english menu tree and french on in the french menu tree. > 2) A feature request: > > To continue with the same example, suppose i have only a file > index.fr.html in /french/. I don't wont the menu to > be /french/index.fr.html (this is a bit redondant), so i set > in_menu: false > for /french/index.fr.html > > However, since this is the only file in /french/ i have to set a > metainfo file: > /french/ > in_menu: true > > It would be more convienent to have an option to specify this > directly in index.fr.html, like routed_title: > > --- > in_menu: false > routed_title: fran?ais > routed_in_menu: true > > Could it be possible to implement this (i may try to produce a patch > if you haven't the time) Should certainly be possible, however, we should possibly think about this in a more general way: a directory is unlocalized but may have localized meta information (title, in_menu, ...). Problem is: the current way routed_title is handled can not easily be generalized to in_menu or other (perhaps unknown) meta information keys. I have added an item to my TODO list. > 3) Another feature request > > In the langbar (with the current_lang option set to true), could it be > possible to put a class="webgen-current-lang" for the current lang? > (to highlight it with css after) I have added this to my TODO list, no problem to implement. > 4) > > I think i saw one of your mail where you said you were working on a > new content processor. Are you still working on it? I would be > interested in trying an alpha-version. > > Maruku is quite bugged (indentations for list and for word list behave > differently), and Redcloth doesn't support mathml. Yeah, I did some work on kramdown last month. It works, sort of. However, I came to a halt when trying to implement syntax evaluation in HTML block/span elements... What I did last month was to go over the kramdown spec document and fix places where its behaviour was not known and to see how syntax evaluation in HTML block/span elements can be done nicely. Basically, kramdown is a Markdown interpreter. However, since I do not agree with all syntax decisions, I have written the kramdown spec document in which all syntax elements of kramdown are document exactly, not only how they are used but also how the output will look like - the latter is not the case with standard Markdown. Also, standard Markdown lacks many things implemented in Maruku, PHP Markdown Extra, MultiMarkdown, pandoc..., many of these extension will also be in kramdown. So, to sump up, kramdown will be similar to Maruku but aims to provide a strict syntax based on Markdown with pre-known outputs for all elements. And it aims to be faster ;-) (currently about twice as fast as Maruku but still *way* slower than rdiscount - beware that these are preliminary results). I will probably put up the kramdown spec document on the website and sync my personal git repo to rubyforge in the near future when I'm satisfied with the state. Will let you know when an alpha version is available. -- Thomas From t_leitner at gmx.at Sat Sep 19 08:18:32 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Sat, 19 Sep 2009 14:18:32 +0200 Subject: [webgen-users] installing webgen In-Reply-To: <1253351319.4828.4.camel@seb-laptop> References: <1253351319.4828.4.camel@seb-laptop> Message-ID: <20090919141832.03a21c45@noeato.local> Hi, > sudo aptitude install ruby rubygems > sudo gem1.8 install webgen > > it successfully installs everything needed but I can't launch webgen > at the command line. > > I am on ubuntu jaunty. > > Is there a step I'm missing? I normally don't install rubygems from the APT repositories since it is always rather old. However, the last time I checked the installation instructions they worked. Have you added the APT rubygems bin-directory to your PATH variable? If I recall correctly, APT rubygems is installed in a non-standard directory (something like /var/rubygems) so you may need to add the bin directory to your PATH variable. If this doesn't work, which error is shown on the command line? -- Thomas From sebastien-mengin at edilibre.net Sat Sep 19 13:32:02 2009 From: sebastien-mengin at edilibre.net (=?ISO-8859-1?Q?S=E9bastien?= Mengin) Date: Sat, 19 Sep 2009 19:32:02 +0200 Subject: [webgen-users] installing webgen In-Reply-To: <20090919141832.03a21c45@noeato.local> References: <1253351319.4828.4.camel@seb-laptop> <20090919141832.03a21c45@noeato.local> Message-ID: <1253381522.18726.2.camel@seb-laptop> Le samedi 19 septembre 2009 ? 14:18 +0200, Thomas Leitner a ?crit : > Hi, > > > sudo aptitude install ruby rubygems > > sudo gem1.8 install webgen > > > > it successfully installs everything needed but I can't launch webgen > > at the command line. > > > > I am on ubuntu jaunty. > > > > Is there a step I'm missing? > > I normally don't install rubygems from the APT repositories since it is > always rather old. However, the last time I checked the installation > instructions they worked. > > Have you added the APT rubygems bin-directory to your PATH variable? If > I recall correctly, APT rubygems is installed in a non-standard > directory (something like /var/rubygems) so you may need to add the bin > directory to your PATH variable. You're right, it is in /var/lib/gems/1.8/gems/webgen-0.5.10/bin/webgen After adding the two following lines to my .bashrc, it actually works perfectly (quite obvious, but just for the record): PATH=$PATH:/var/lib/gems/1.8/bin/ export PATH Thanks for your answer, -- S?bastien Mengin Edilibre.net -- ?dition et logiciels libres www.edilibre.net From t_leitner at gmx.at Sat Sep 19 16:32:13 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Sat, 19 Sep 2009 22:32:13 +0200 Subject: [webgen-users] installing webgen In-Reply-To: <1253381522.18726.2.camel@seb-laptop> References: <1253351319.4828.4.camel@seb-laptop> <20090919141832.03a21c45@noeato.local> <1253381522.18726.2.camel@seb-laptop> Message-ID: <20090919223213.525f77b5@noeato.local> > > Have you added the APT rubygems bin-directory to your PATH > > variable? If I recall correctly, APT rubygems is installed in a > > non-standard directory (something like /var/rubygems) so you may > > need to add the bin directory to your PATH variable. > > You're right, it is in > > /var/lib/gems/1.8/gems/webgen-0.5.10/bin/webgen > > After adding the two following lines to my .bashrc, it actually works > perfectly (quite obvious, but just for the record): > > PATH=$PATH:/var/lib/gems/1.8/bin/ > export PATH > > Thanks for your answer, No problem! Thanks for reporting the actual path, will include this in the installation document. -- Thomas From leafstormrush at gmail.com Mon Sep 21 09:56:53 2009 From: leafstormrush at gmail.com (Leaf) Date: Mon, 21 Sep 2009 06:56:53 -0700 (PDT) Subject: [webgen-users] Using Textile as default markup Message-ID: <62491a92-ece9-4a92-bdf8-a33ad6541e09@f33g2000vbm.googlegroups.com> I'm trying to put together a Web site in Webgen. However, I can't figure out how to get the site to use Textile. When I try adding a 'sourcehandler.default_meta_options' option to the config file, it keeps throwing stupid errors about hash merging and method calls and the like, and since I'm not a Ruby programmer, I have no idea how to track them all down. When I use the 'blocks' meta option on every page, not only does the Textile not process, but my CSS file doesn't show up. How do I get the entire site to use Textile while still having everything else work like the default? A configuration file snippet (that actually works) would be appreciated. -- LeafStorm From t_leitner at gmx.at Tue Sep 22 03:11:07 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Tue, 22 Sep 2009 09:11:07 +0200 Subject: [webgen-users] Using Textile as default markup In-Reply-To: <62491a92-ece9-4a92-bdf8-a33ad6541e09@f33g2000vbm.googlegroups.com> References: <62491a92-ece9-4a92-bdf8-a33ad6541e09@f33g2000vbm.googlegroups.com> Message-ID: <20090922091107.3c94e326@noeato.local> Am Mon, 21 Sep 2009 06:56:53 -0700 (PDT) schrieb Leaf : > I'm trying to put together a Web site in Webgen. However, I can't > figure out how to get the site to use Textile. When I try adding a > 'sourcehandler.default_meta_options' option to the config file, it > keeps throwing stupid errors about hash merging and method calls and > the like, and since I'm not a Ruby programmer, I have no idea how to > track them all down. When I use the 'blocks' meta option on every > page, not only does the Textile not process, but my CSS file doesn't > show up. > > How do I get the entire site to use Textile while still having > everything else work like the default? A configuration file snippet > (that actually works) would be appreciated. Put the following into your config.yaml file: default_processing_pipeline: Page: erb,tags,textile,blocks,fragments This changes only the used markup language from Markdown to Textile. -- Thomas From leafstormrush at gmail.com Tue Sep 22 07:24:28 2009 From: leafstormrush at gmail.com (Leaf) Date: Tue, 22 Sep 2009 04:24:28 -0700 (PDT) Subject: [webgen-users] Using Textile as default markup In-Reply-To: <20090922091107.3c94e326@noeato.local> References: <62491a92-ece9-4a92-bdf8-a33ad6541e09@f33g2000vbm.googlegroups.com> <20090922091107.3c94e326@noeato.local> Message-ID: <0789be75-7be0-4c27-8e56-932e7e054f36@q14g2000vbi.googlegroups.com> Thanks. The markup is working fine. The config file documentation gave me the impression that I needed to use sourcehandler.default_meta_information to do this. My stylesheet's still not getting copied, though. I added: patterns: Copy: add: ['**/*.css'] but the file still is not copied. It is named 'default.css' in the root directory. Do you know why this could be happening? -- Leaf On Sep 22, 3:11?am, Thomas Leitner wrote: > Am Mon, 21 Sep 2009 06:56:53 -0700 (PDT) > schrieb Leaf : > > > I'm trying to put together a Web site in Webgen. However, I can't > > figure out how to get the site to use Textile. When I try adding a > > 'sourcehandler.default_meta_options' option to the config file, it > > keeps throwing stupid errors about hash merging and method calls and > > the like, and since I'm not a Ruby programmer, I have no idea how to > > track them all down. When I use the 'blocks' meta option on every > > page, not only does the Textile not process, but my CSS file doesn't > > show up. > > > How do I get the entire site to use Textile while still having > > everything else work like the default? A configuration file snippet > > (that actually works) would be appreciated. > > Put the following into your config.yaml file: > > default_processing_pipeline: > ? Page: erb,tags,textile,blocks,fragments > > This changes only the used markup language from Markdown to Textile. > > -- Thomas > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users From kchmck at gmail.com Sat Sep 26 20:34:34 2009 From: kchmck at gmail.com (mkoch) Date: Sat, 26 Sep 2009 17:34:34 -0700 (PDT) Subject: [webgen-users] Haml & Sass Message-ID: I would like to use Haml for pages (and possibly templates) and Sass for CSS. But I am a webgen newbie and can't figure out the configuration. Is such a configuration possible? Could someone help me set it up? From t_leitner at gmx.at Sun Sep 27 03:51:42 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Sun, 27 Sep 2009 09:51:42 +0200 Subject: [webgen-users] Haml & Sass In-Reply-To: References: Message-ID: <20090927095142.798aae53@noeato.local> > I would like to use Haml for pages (and possibly templates) and Sass > for CSS. But I am a webgen newbie and can't figure out the > configuration. Is such a configuration possible? Could someone help me > set it up? You need to put the following into your config.yaml file: default_processing_pipeline: Page: haml,fragments Normally, the processing pipeline also includes erb, tags and blocks tags, but I think they are not needed when using haml since haml includes facilities to execute ruby commands (and tag results can still be used through the context object as well as block rendering). If you need to change the default for template files, just add another entry with Template as key instead of Page. If you want to use sass for your CSS files, just name them something like default.sass.css. This will tell the copy handler that sass should be run on the content before writing it to the output path. If you need further help, don't hesitate to write again! Best regars, Thomas From t_leitner at gmx.at Sun Sep 27 06:58:22 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Sun, 27 Sep 2009 12:58:22 +0200 Subject: [webgen-users] Using Textile as default markup In-Reply-To: <0789be75-7be0-4c27-8e56-932e7e054f36@q14g2000vbi.googlegroups.com> References: <62491a92-ece9-4a92-bdf8-a33ad6541e09@f33g2000vbm.googlegroups.com> <20090922091107.3c94e326@noeato.local> <0789be75-7be0-4c27-8e56-932e7e054f36@q14g2000vbi.googlegroups.com> Message-ID: <20090927125822.72a5f400@noeato.local> > My stylesheet's still not getting copied, though. I added: > > patterns: > Copy: > add: ['**/*.css'] > > but the file still is not copied. It is named 'default.css' in the > root directory. Do you know why this could be happening? The above is not necessary since css files are handled by copy sourcehandler by default. It's odd that the file does not get copied... What happens if you run webgen in verbose mode (webgen -v -l 0)? Can you post the output? -- Thomas From kchmck at gmail.com Sun Sep 27 10:52:41 2009 From: kchmck at gmail.com (Mick Koch) Date: Sun, 27 Sep 2009 07:52:41 -0700 (PDT) Subject: [webgen-users] Haml & Sass In-Reply-To: <20090927095142.798aae53@noeato.local> References: <20090927095142.798aae53@noeato.local> Message-ID: Thank you for your help! I think I'm getting the hang of it now. Just for future reference, this is a bare bones setup: config.yaml =========== default_processing_pipeline: Page: haml,fragments Template: haml,fragments default.template ================ !!! XML !!! 1.1 %head %link{:rel => "stylesheet", :type => "text/css", :href => "default.css"} %title= context.node["title"] %body = context.render_block("content") index.page ========== --- title: A page --- %h1 A heading The resulting index.html ======================== A page

A heading

On Sep 27, 3:51 am, Thomas Leitner wrote: > > I would like to use Haml for pages (and possibly templates) and Sass > > for CSS. But I am a webgen newbie and can't figure out the > > configuration. Is such a configuration possible? Could someone help me > > set it up? > > You need to put the following into your config.yaml file: > > default_processing_pipeline: > Page: haml,fragments > > Normally, the processing pipeline also includes erb, tags and blocks > tags, but I think they are not needed when using haml since haml > includes facilities to execute ruby commands (and tag results can still > be used through the context object as well as block rendering). > > If you need to change the default for template files, just add another > entry with Template as key instead of Page. > > If you want to use sass for your CSS files, just name them something > like default.sass.css. This will tell the copy handler that sass should > be run on the content before writing it to the output path. > > If you need further help, don't hesitate to write again! > > Best regars, > Thomas > _______________________________________________ > webgen-users mailing list > webgen-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/webgen-users From t_leitner at gmx.at Mon Sep 28 05:22:44 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Mon, 28 Sep 2009 11:22:44 +0200 Subject: [webgen-users] Haml & Sass In-Reply-To: References: <20090927095142.798aae53@noeato.local> Message-ID: <20090928112244.631c2d52@noeato.local> Am Sun, 27 Sep 2009 07:52:41 -0700 (PDT) schrieb Mick Koch : > Thank you for your help! I think I'm getting the hang of it now. Just > for future > reference, this is a bare bones setup: > > config.yaml > =========== > default_processing_pipeline: > Page: haml,fragments > Template: haml,fragments > You only need to specify the fragments content processor once. If you specify it for the page file, only headers of the page content itself will be mapped to fragment nodes. If you specify it for templates, all headers will be mapped to fragment nodes which may not be what you want. Also note that only headers with IDs get mapped to fragment nodes. -- Thomas From kchmck at gmail.com Mon Sep 28 17:48:04 2009 From: kchmck at gmail.com (Testan) Date: Mon, 28 Sep 2009 14:48:04 -0700 (PDT) Subject: [webgen-users] Haml & Sass In-Reply-To: <20090928112244.631c2d52@noeato.local> References: <20090927095142.798aae53@noeato.local> <20090928112244.631c2d52@noeato.local> Message-ID: On Sep 28, 5:22 am, Thomas Leitner wrote: > > config.yaml > > =========== > > default_processing_pipeline: > > Page: haml,fragments > > Template: haml,fragments > > You only need to specify the fragments content processor once. If you > specify it for the page file, only headers of the page content itself > will be mapped to fragment nodes. If you specify it for templates, all > headers will be mapped to fragment nodes which may not be what you > want. Also note that only headers with IDs get mapped to fragment nodes. Ah, okay. Good to know.