From michaelfranzl at gmx.at Wed Jul 1 15:02:50 2009 From: michaelfranzl at gmx.at (Michael Franzl) Date: Wed, 01 Jul 2009 21:02:50 +0200 Subject: [webgen-users] menu tag extension suggestion Message-ID: <4A4BB2DA.30301@gmx.at> Hi, I want to suggest an extension for the "used_nodes" option of the menu tag. Currently, there are the options "all", "files" and "fragments" implemented. What about distinguishing "files" and "directories"? This would come in handy with traditional website structures. Example: |-folder1 | |- index.page | |-folder2 | |- index.page | |-about.page |-contact.page |-index.page On traditional website structures, there is usually a separate placed meta-navigation menu containing contact data, about pages, terms of use, etc. This could be easily generated with {menu: {used_nodes: files, start_level: 1, max_levels: 1}} While the main menu would be generated with {menu: {used_nodes: directories, start_level: 1, max_levels: 1}} Without this, the meta-navigation menu would have to be typed manually. Further, I noticed that if "used_nodes" is omitted in a menu tag, then the meta information setting "in_menu: false" will be ignored and everything is visible in the menu. Is this intentional behavior? Thanks, Michael From t_leitner at gmx.at Wed Jul 1 07:50:56 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Wed, 1 Jul 2009 13:50:56 +0200 Subject: [webgen-users] menu tag extension suggestion In-Reply-To: <4A4BB2DA.30301@gmx.at> References: <4A4BB2DA.30301@gmx.at> Message-ID: <20090701135056.223c2184@77.118.67.2.wireless.dyn.drei.com> > On traditional website structures, there is usually a separate placed > meta-navigation menu containing contact data, about pages, terms of > use, etc. This could be easily generated with > > {menu: {used_nodes: files, start_level: 1, max_levels: 1}} > > While the main menu would be generated with > > {menu: {used_nodes: directories, start_level: 1, max_levels: 1}} > > Without this, the meta-navigation menu would have to be typed > manually. Thanks for the suggestions! However, since I plan to redesign how the menu is generated, I will probably not implement the directories value. The new mode of operation will then allow complete control over the nodes included in a menu and its representation. Ie. it will also be possible to specify more than one menu! Since I will have now more time again I hope that I will also find more time for webgen development. The next release will probably be out in the next one or two weeks. > Further, I noticed that if "used_nodes" is omitted in a menu tag, then > the meta information setting "in_menu: false" will be ignored and > everything is visible in the menu. Is this intentional behavior? If you leave out the "used_nodes" key, the default value for it is taken which is "all". This means that fragments are also shown in the menu and since fragments are generated automatically by default via the fragments content processor, all files that have fragment nodes will show up in the menu! -- Thomas From michaelfranzl at gmx.at Wed Jul 1 18:59:06 2009 From: michaelfranzl at gmx.at (Michael Franzl) Date: Thu, 02 Jul 2009 00:59:06 +0200 Subject: [webgen-users] menu tag extension suggestion In-Reply-To: <20090701135056.223c2184@77.118.67.2.wireless.dyn.drei.com> References: <4A4BB2DA.30301@gmx.at> <20090701135056.223c2184@77.118.67.2.wireless.dyn.drei.com> Message-ID: <4A4BEA3A.8090907@gmx.at> Thomas Leitner wrote: > Thanks for the suggestions! However, since I plan to redesign how the > menu is generated, I will probably not implement the directories value. > The new mode of operation will then allow complete control over the > nodes included in a menu and its representation. Ie. it will also be > possible to specify more than one menu! > Since I will have now more time again I hope that I will also find more > time for webgen development. The next release will probably be out in > the next one or two weeks. Great news! Webgen has proven to me as an indispensable tool for rapid web-development. With its collection of content processors in one place (my favorites being haml, sass and maruku) and its template engine, it allows for really flexible solutions for lots of different website purposes! Since I actually earned money with webgen, I've donated a small amount also to you for balance. Thanks for webgen and keep it up! > If you leave out the "used_nodes" key, the default value for it is > taken which is "all". This means that fragments are also shown in the > menu and since fragments are generated automatically by default via the > fragments content processor, all files that have fragment nodes will > show up in the menu! Well, when an 'invisible' default value overrides a 'visible' "in_menu: false", that's a bit counterintuitive IMO. I had to dig hard to find that one out! Another suggestion: What about including a postprocessor for pretty HTML formatting? See http://raa.ruby-lang.org/project/tidy Thanks, Michael From t_leitner at gmx.at Thu Jul 2 14:55:54 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Thu, 2 Jul 2009 20:55:54 +0200 Subject: [webgen-users] menu tag extension suggestion In-Reply-To: <4A4BEA3A.8090907@gmx.at> References: <4A4BB2DA.30301@gmx.at> <20090701135056.223c2184@77.118.67.2.wireless.dyn.drei.com> <4A4BEA3A.8090907@gmx.at> Message-ID: <20090702205554.7f288dbc@77.118.67.2.wireless.dyn.drei.com> > Since I actually earned money with webgen, I've donated a small > amount also to you for balance. > > Thanks for webgen and keep it up! Thanks!!! > > If you leave out the "used_nodes" key, the default value for it is > > taken which is "all". This means that fragments are also shown in > > the menu and since fragments are generated automatically by default > > via the fragments content processor, all files that have fragment > > nodes will show up in the menu! > > Well, when an 'invisible' default value overrides a 'visible' > "in_menu: false", that's a bit counterintuitive IMO. I had to dig > hard to find that one out! Yeah, that's really a bit counterintuitive. I think the best 'solution' to this is to set the default to 'files' for the time being?! > Another suggestion: What about including a postprocessor for pretty > HTML formatting? See http://raa.ruby-lang.org/project/tidy Should be easy to do, will look at it. Best regards, Thomas From michaelfranzl at gmx.at Fri Jul 3 13:52:15 2009 From: michaelfranzl at gmx.at (Michael Franzl) Date: Fri, 03 Jul 2009 19:52:15 +0200 Subject: [webgen-users] menu tag extension suggestion In-Reply-To: <20090702205554.7f288dbc@77.118.67.2.wireless.dyn.drei.com> References: <4A4BB2DA.30301@gmx.at> <20090701135056.223c2184@77.118.67.2.wireless.dyn.drei.com> <4A4BEA3A.8090907@gmx.at> <20090702205554.7f288dbc@77.118.67.2.wireless.dyn.drei.com> Message-ID: <4A4E454F.4040909@gmx.at> > Yeah, that's really a bit counterintuitive. I think the best 'solution' > to this is to set the default to 'files' for the time being?! This would help for the time being IMO. Another question: I noticed the depreciation warning that the object "node" will be replaced with "context.node". Well, at least in my experience with webgen, "node" is frequently used in templates for doing page specific things -- like excluding a sidebar when a certain metainfo value is set. Would it be possible to create an short alias for "context.node", like "n", for the sake of 'cleaner' template code? Michael From t_leitner at gmx.at Fri Jul 3 10:29:02 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Fri, 3 Jul 2009 16:29:02 +0200 Subject: [webgen-users] menu tag extension suggestion In-Reply-To: <4A4E454F.4040909@gmx.at> References: <4A4BB2DA.30301@gmx.at> <20090701135056.223c2184@77.118.67.2.wireless.dyn.drei.com> <4A4BEA3A.8090907@gmx.at> <20090702205554.7f288dbc@77.118.67.2.wireless.dyn.drei.com> <4A4E454F.4040909@gmx.at> Message-ID: <20090703162902.69978744@77.118.67.2.wireless.dyn.drei.com> Am Fri, 03 Jul 2009 19:52:15 +0200 schrieb Michael Franzl : > > Yeah, that's really a bit counterintuitive. I think the best > > 'solution' to this is to set the default to 'files' for the time > > being?! > > This would help for the time being IMO. Hmm... I just realized that this change would lead to a big problem: *all* current sites which do not specify the used_nodes options in the menu tag itself will work differently which is not really that good... So I'm inclined to leave the default as it is... > Another question: > > I noticed the depreciation warning that the object "node" will be > replaced with "context.node". Well, at least in my experience with > webgen, "node" is frequently used in templates for doing page > specific things -- like excluding a sidebar when a certain metainfo > value is set. > > Would it be possible to create an short alias for "context.node", > like "n", for the sake of 'cleaner' template code? Certainly possible, but not very descriptive! If you find yourself using `context.node` very often in a template, you could just do `n = context.node` at the beginning of the template. In the last releases I have actually deprecated all short forms (node, ref_node, ...) because I wanted to have one object, the context object, to hold all the needed information. Also note that in the next version of webgen, the context object will be much more powerful since it will provide easy access to render nodes via the blocks content processor and to render tags via the tag content processor! -- Thomas From michaelfranzl at gmx.at Sun Jul 5 18:52:51 2009 From: michaelfranzl at gmx.at (Michael Franzl) Date: Mon, 06 Jul 2009 00:52:51 +0200 Subject: [webgen-users] menu tag extension suggestion In-Reply-To: <20090703162902.69978744@77.118.67.2.wireless.dyn.drei.com> References: <4A4BB2DA.30301@gmx.at> <20090701135056.223c2184@77.118.67.2.wireless.dyn.drei.com> <4A4BEA3A.8090907@gmx.at> <20090702205554.7f288dbc@77.118.67.2.wireless.dyn.drei.com> <4A4E454F.4040909@gmx.at> <20090703162902.69978744@77.118.67.2.wireless.dyn.drei.com> Message-ID: <4A512EC3.2040605@gmx.at> > Hmm... I just realized that this change would lead to a big problem: > *all* current sites which do not specify the used_nodes options in the > menu tag itself will work differently which is not really that good... > > So I'm inclined to leave the default as it is... I think a hint in the documentation will do it too. > Certainly possible, but not very descriptive! If you find yourself > using `context.node` very often in a template, you could just do `n = > context.node` at the beginning of the template. > > In the last releases I have actually deprecated all short forms (node, > ref_node, ...) because I wanted to have one object, the context object, > to hold all the needed information. Understandable. Then in this case `n = context.node` is good enough! > Also note that in the next version of webgen, the context object will > be much more powerful since it will provide easy access to render nodes > via the blocks content processor and to render tags via the tag content > processor! Will Maruku 0.6.0 also be supported? It seems to be Ruby 1.9 compatible! Michael From t_leitner at gmx.at Mon Jul 6 01:16:09 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Mon, 6 Jul 2009 07:16:09 +0200 Subject: [webgen-users] menu tag extension suggestion In-Reply-To: <4A512EC3.2040605@gmx.at> References: <4A4BB2DA.30301@gmx.at> <20090701135056.223c2184@77.118.67.2.wireless.dyn.drei.com> <4A4BEA3A.8090907@gmx.at> <20090702205554.7f288dbc@77.118.67.2.wireless.dyn.drei.com> <4A4E454F.4040909@gmx.at> <20090703162902.69978744@77.118.67.2.wireless.dyn.drei.com> <4A512EC3.2040605@gmx.at> Message-ID: <20090706071609.32fb13fd@77.118.67.2.wireless.dyn.drei.com> > > Hmm... I just realized that this change would lead to a big problem: > > *all* current sites which do not specify the used_nodes options in > > the menu tag itself will work differently which is not really that > > good... > > > > So I'm inclined to leave the default as it is... > > I think a hint in the documentation will do it too. Will do that! > > Also note that in the next version of webgen, the context object > > will be much more powerful since it will provide easy access to > > render nodes via the blocks content processor and to render tags > > via the tag content processor! > > Will Maruku 0.6.0 also be supported? It seems to be Ruby 1.9 > compatible! The next version will recommend Maruku 0.6.0 and this version of Maruku indeed works better on 0.6.0. However, there was a change in how REXML process tags with namespaces which affects Maruku: it isn't possible now to use HTML/XML tags with namespaces in Maruku markup! Since webgen uses namespaced XML tags for some features (for example, ) this is very bad... I haven't found out how to nicely parse an XML document with namespaces that have not been specified beforehand with REXML under 1.9 without resorting to some hacks. -- Thomas From director at flgenweb.net Thu Jul 2 14:40:21 2009 From: director at flgenweb.net (Director FLGenWeb) Date: Thu, 2 Jul 2009 11:40:21 -0700 (PDT) Subject: [webgen-users] Total Newbie Message-ID: <2debc05f-1561-4426-b0c0-8acd6d3f75c5@37g2000yqp.googlegroups.com> Hi folks, I am a total newbie t anything like this and have intermediate html skills only.no programming or anything. This looks like it would be a good thing for our organization, www.flgenwebarchives.com and www.flgenweb.net (very much still in the development phase). A lot of our volunteers have no html skills and we need something that they can use to create sites with no skills. I have been reading and trying to understand what I am reading but it is all way way over my head. Can anyone help me to maybe understand a bit better? What I found intriguing is that the template page included the same Andreas template our organization already uses. >From what I read it can be installed on my pc (windowsxp2 sp2) and our webhosting package? Laverne Tornow Director of Operations FLGenWeb Project, Inc 501 (c) 3 exempt charity From t_leitner at gmx.at Mon Jul 6 06:52:30 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Mon, 6 Jul 2009 12:52:30 +0200 Subject: [webgen-users] Total Newbie In-Reply-To: <2debc05f-1561-4426-b0c0-8acd6d3f75c5@37g2000yqp.googlegroups.com> References: <2debc05f-1561-4426-b0c0-8acd6d3f75c5@37g2000yqp.googlegroups.com> Message-ID: <20090706125230.226cacd9@77.118.67.2.wireless.dyn.drei.com> Hi, > I am a total newbie t anything like this and have intermediate html > skills only.no programming or anything. This looks like it would be a > good thing for our organization, www.flgenwebarchives.com and > www.flgenweb.net (very much still in the development phase). A lot > of our volunteers have no html skills and we need something that they > can use to create sites with no skills. I have been reading and > trying to understand what I am reading but it is all way way over my > head. Can anyone help me to maybe understand a bit better? What I > found intriguing is that the template page included the same Andreas > template our organization already uses. yes, this template is provided with webgen. I imagine you would just need to update/adjust the CSS file. Basically, you can create content for your site by not writing HTML but using a markup language like Textile (via the RedCloth library) or Markdown (the default, via the Maruku library). All files then use one (or possibly more) template(s) to create the final HTML file in the output directory. Images and other assets are copied verbatim to the output directory. I would recommend that you just install webgen, follow the Getting Started Guide (http://webgen.rubyforge.org/documentation/getting_started.html) and play around a bit. You can always ask further specific questions on the mailing list. > >>From what I read it can be installed on my pc (windowsxp2 sp2) and > >>our > webhosting package? Yes, webgen works under Windows. You will find information on how to install webgen on Windows on http://webgen.rubyforge.org/installation.html Regarding the webhosting package: webgen is an HTML *generator*. This means that all the HTML files and asset files are generated locally on your computer and just need to be uploaded to your webhost. This also means that your webhost doesn't need to have any dynamic features like PHP. -- Thomas From t_leitner at gmx.at Sun Jul 12 11:49:22 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Sun, 12 Jul 2009 17:49:22 +0200 Subject: [webgen-users] Some news Message-ID: <20090712174922.009b4159@77.118.67.2.wireless.dyn.drei.com> Hey everybody, just wanted to let you know that I have just pushed the latest changes to the Rubyforge and Github repositories: * better error reporting (with line numbers and file names) * new content processor tidy * some fixes (especially for content processor head) * some documentation updates The next version 0.5.9 of webgen will now definitely be released in about two weeks. I won't have internet access till about Monday in a week so I won't be able to answers mails immediately. If you find any bugs in the repo version please file a ticket on Rubyforge or post to the mailing list - thanks! Best regards, Thomas From t_leitner at gmx.at Sun Jul 26 01:37:56 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Sun, 26 Jul 2009 07:37:56 +0200 Subject: [webgen-users] [ANN] webgen 0.5.9 released Message-ID: <20090726073756.11039a77@77.118.67.2.wireless.dyn.drei.com> Hey everybody! -------------- webgen 0.5.9 has just been released! If you don't know what webgen is, read the "What's webgen?" section down below. This announcement is also available at http://webgen.rubyforge.org/news/release_0_5_9.html This release does not bring many new and cool features (some naturally made it into this release ;-) but it is another step to bringing more advanced functionality like image gallery and blog support to webgen. Since gallery and blog template files will rely heavily on embedded Ruby scripts via erb, haml and thelike, the functionality of the context object has been expanded to allow the programmatic inclusion of tags and the rendering of blocks. Another important change in this release is that the naming convention for paths has been made stricter sothat it is easier to derive the (a)(l)cn from a source path. Also note that there have been some incompatible API changes! Changes ------- * Major enhancements: - webgen tags can now be accessed and used via the `context` object provided by some content processors ([builder][1], [erb][2], [erubis][3], and [haml][4]). Tag handlers that do not use the `Webgen::Tag::Base` module now need to provide one more method - see the API documentation! - Likewise, blocks can now be rendered via the `context` object in the same way as can be done via the [`blocks` content processor][5]. - Change in source path naming convention: only files have different parts now (sort information, basename, extension), directories and fragments not - see [Source Paths Naming Convention][6]! Also note that directories now always have a trailing slash (source paths and canonical names)! This change may lead to unexpected behaviour if you used the sort information part or an extension in your directory names! Check this before upgrading to this version! - There is the new notion of *passive sources* which do not actively create nodes from paths but only on-demand when a to-be-resolved path is not found. This is, for example, very useful for shipping default files that can easily be overridden with custom files by putting the custom files under the to-be-resolve path in a normal source directory. - There is now a better system for error reporting which allows for more detailed and more specific (with path name and approximate line number) error reports. * Minor enhancements: - Added new content processor [`head`][8] for inserting CSS/JS fragments and links into the head section of an HTML file. Arbitrary `meta` tags can also be inserted. - Added new content processor [`tidy`][10] for running tidy over a (most often generated) HTML file (requested by Michael Franzl). - Special characters like German umlauts and spaces are now allowed in paths (suggested by Michael Franzl). However, note that using paths with such characters may lead to problems when accessing them later on the server! - Added new configuration option [`output.do_deletion`][7] for specifying if generated files should be deleted if their respective source is deleted (suggested by Matthias Kirschner). - Added new configuration option [`tag.coderay.css`][9] which allows the inclusion of external stylesheets. - Added new meta information [`used_nodes`][11] for specifying dependencies for a node (suggested by Hermann Schichl). - The feed source handler now uses the passive sources system for finding its templates and does not rely on the `feedtools` library anymore (which gives a huge speedup). - The sitemap source handler now uses the passive sources system for finding its templates and dos not rely on the `builder` library anymore. And the format of a `*.sitemap` file is now similar to that of a `*.feed` file for consistency. - The `ERB::Util` module is now available when using the `erb` content processor. - Directories are not created anymore if they do not contain any files. - There is now the distinction between textual and binary content processors. - The leading and trailing whitespace of content blocks in Webgen Page Format is not removed anymore. * Bug fixes: - Fixed bug RF#25943: apply command did not work without explicitly specifying a directory - `Tag::Relocatable`: the resolved node is now additionally used as dependency for detecting a change - Switching on `host_os` instead of `arch` for specifying Windows specific behaviour (in preparation for the change of the Windows Ruby Installer). - Using `$?.exitstatus` instead of bit shifting to fix a JRuby issue - webgen tag handlers are now called only if all mandatory parameters are set - Fixed `Website#render` to work when called multiple times - Fixed `Node#is_directory?` to also work when called on a fragment with a trailing slash * Incompatible API changes: - Since one can now get at the parent node of a to-be-created node directly via the Path object, the interface for creating nodes has been simplified. The method `SourceHandler::Base#create_node` now only takes a path parameter and optionally an options hash for special cases (fragment nodes and virtual nodes), `SourceHandler::Base#node_exists` has seen a similar change. The `create_nodes` service signature also changed. Also note that the `before_node_created` message now only sends the path instead of parent and path. These changes will in most cases render custom source handlers nonfunctional! Read the API documentation and have a look at the shipped source handlers! - `Node.absolute_name` has been removed since it has no purpose anymore! * Deprecation notes: - `Path#cnbase` and `Path#cnbase=` are now deprecated, use `Path#basename` and `Path#basename=` instead! - `Common.absolute_path(path, base)` is deprecated, use `Path.make_absolute(base, path)` instead! Note the different parameter order! - `Node#absolute_cn` and `Node#absolute_lcn` are now deprecated, use `Node#acn` and `Node#alcn` instead! [1]: http://webgen.rubyforge.org/documentation/contentprocessor/builder.html [2]: http://webgen.rubyforge.org/documentation/contentprocessor/erb.html [3]: http://webgen.rubyforge.org/documentation/contentprocessor/erubis.html [4]: http://webgen.rubyforge.org/documentation/contentprocessor/haml.html [5]: http://webgen.rubyforge.org/documentation/contentprocessor/blocks.html [6]: http://webgen.rubyforge.org/documentation/manual.html#source-naming [7]: http://webgen.rubyforge.org/documentation/reference_configuration.html#outputdo_deletion [8]: http://webgen.rubyforge.org/documentation/contentprocessor/head.html [9]: http://webgen.rubyforge.org/documentation/reference_configuration.html#tagcoderaycss [10]: http://webgen.rubyforge.org/documentation/contentprocessor/tidy.html [11]: http://webgen.rubyforge.org/documentation/reference_metainfo.html#used_nodes What's webgen? -------------- webgen is a tool to generate static websites by combining content with template files. You create one or more template files in which you define the layout of your page and where the content should go. After that you create page files in which you only define the content. You can use a variety of markup languages like Textile or Markdown or Haml to define your content and you can add dynamic parts via ERB or by using webgen tags. This allows the automatic generation of menus, breadcrumb trails and much more! Installation ------------ gem install webgen Usage ----- See http://webgen.rubyforge.org/documentation/ From nkirlew at bigpond.net.au Tue Jul 28 06:52:38 2009 From: nkirlew at bigpond.net.au (nkirlew) Date: Tue, 28 Jul 2009 03:52:38 -0700 (PDT) Subject: [webgen-users] How to place a single graphic in Webgen? Message-ID: <6feb3cff-18fd-401e-9a02-f8c3408b503b@x5g2000prf.googlegroups.com> Congrats on the latest version upgrade to webgen. My Webgen website is growing great guns, I am using the supplied web sites and reverse engineering to learn how things work. I am stumped on how to place a single image on a page by making an entry onto my index.page I have managed to copy the block quote examples and thus get the lightbulb image in a block quote. Apologies for what must be a very simple question, and thanks in advance ... Regards Nick Kirlew From t_leitner at gmx.at Wed Jul 29 03:37:34 2009 From: t_leitner at gmx.at (Thomas Leitner) Date: Wed, 29 Jul 2009 09:37:34 +0200 Subject: [webgen-users] How to place a single graphic in Webgen? In-Reply-To: <6feb3cff-18fd-401e-9a02-f8c3408b503b@x5g2000prf.googlegroups.com> References: <6feb3cff-18fd-401e-9a02-f8c3408b503b@x5g2000prf.googlegroups.com> Message-ID: <20090729093734.34b68e25@77.118.67.2.wireless.dyn.drei.com> > Congrats on the latest version upgrade to webgen. > My Webgen website is growing great guns, I am using the supplied web > sites and reverse engineering to learn how things work. > I am stumped on how to place a single image on a page by making an > entry onto my index.page > > I have managed to copy the block quote examples and thus get the > lightbulb image in a block quote. > Apologies for what must be a very simple question, and thanks in > advance ... Depending on the markup language you use, you can try one of the following: * HTML: pic * Textile: !{relocatable: path/to/image.jpg}! * Markdown: ![pic]({relocatable: path/to/image.jpg}) -- Thomas