I''ve considered switching from Ikiwiki to Webgen, particularly because the former doesn''t work under Cygwin. There''s a problem, however: Webgen doesn''t seem to support proper markdown syntax. In particular, Maruku seems to require (bullet) lists to be unintended, which makes for extra conversion work and unreadable plain text documents. (I have READMEs and such in markdown syntax that I convert for the Web. They sould be readable as plain text.) Changing the processing pipeline to mention markdown doesn''t help. Is it possible to use a real markdown engine? -- Stop Gnomes and other pests! Purchase Windows today!
I know what you mean. I tried to switch to Maruku, failed horribly, wasted a lot of time, and finally stuck with RedCloth. -- Chad On Thu, Mar 12, 2009 at 10:42 AM, Tuomo Valkonen <tuomov at iki.fi> wrote:> > I''ve considered switching from Ikiwiki to Webgen, particularly > because the former doesn''t work under Cygwin. There''s a problem, > however: Webgen doesn''t seem to support proper markdown syntax. > In particular, Maruku seems to require (bullet) lists to be > unintended, which makes for extra conversion work and unreadable > plain text documents. (I have READMEs and such in markdown syntax > that I convert for the Web. They sould be readable as plain text.) > Changing the processing pipeline to mention markdown doesn''t help. > > Is it possible to use a real markdown engine? > > -- > Stop Gnomes and other pests! Purchase Windows today! > > _______________________________________________ > webgen-users mailing list > webgen-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/webgen-users >
On 2009-03-13, Chad Woolley <thewoolleyman at gmail.com> wrote:> I know what you mean. I tried to switch to Maruku, failed horribly, > wasted a lot of time, and finally stuck with RedCloth.I actually seem to have found the solution: rdiscount. It renders my pages mostly allright. Now, all I need is an ''inline'' extension for collecting FAQ items and news on a single page... Or maybe there''s another solution? (Feeds wanted as well:) -- "[Fashion] is usually a form of ugliness so intolerable that we have to alter it every six months." -- Oscar Wilde "The computer industry is the only industry that is more fashion-driven than women''s fashion." -- RMS
Am Fri, 13 Mar 2009 01:07:17 +0000 (UTC) schrieb Tuomo Valkonen <tuomov at iki.fi>:> On 2009-03-13, Chad Woolley <thewoolleyman at gmail.com> wrote: > > I know what you mean. I tried to switch to Maruku, failed horribly, > > wasted a lot of time, and finally stuck with RedCloth. > > I actually seem to have found the solution: rdiscount. > It renders my pages mostly allright. Now, all I need > is an ''inline'' extension for collecting FAQ items and > news on a single page... Or maybe there''s another > solution? (Feeds wanted as well:)RDiscount is a Markdown-only parser but does not have the extensions provided by Maruku. However, it is definitly the fastest option! And it complies with the Markdown rules set by the original Markdown implementation. So I would go for it! Regarding the FAQ items: if I should help you, I need a little bit more information on how the FAQ items are structured etc. RSS feed generation is possible with webgen - see the documentation! Some thoughts on Markdown/Textile: I find it rather peculiar that there is only one Textile library for Ruby but that there are several Markdown libraries (BlueCloth, Maruku, RDiscount, and maybe some more). I think that this is also because of some people being not satisfied with the default Markdown syntax - I certainly really like the basic set of Markdown syntax but it lacks essential things like assigning header IDs. This is possible with extensions pioneered by PHP Markdown Extra and implement in Maruku. And this is the reason for Maruku being the default markup converter in webgen. However, since Maruku itself isn''t perfect and there are not definite rules for the translation of Markdown syntax (and the extra syntax) to HTML, I have started to implement my own Markdown+Extras parsing/converting library. It will become the default converter for webgen once it has all the needed features. The main aspects of kramdown, the name of this new library, are: * Based on the basic Markdown syntax but with definite rules stating what happens in every possible situation. Therefore the output of kramdown may be slightly different to that of rdiscount or any other ''conforming'' Markdown converter. The upside is that you know the outcome when you write the markup - you don''t have to test various possibilities! * Support for extras like automatic creation of header IDs, fenced code blocks, Markdown inside HTML, foot notes etc. * Fast. In current benchmarks it is around 3 to 4 times faster than Maruku on Ruby 1.8. It is still 20x slower than rdiscount but provides more features. * Since it creates an internal representation like Maruku, it is possible to create other output formats in the future or manipulate the representation before converting to an output format. Most features are already implemented, I still need to fix some minor issues with the HTML parsing part. So maybe kramdown will become a viable alternative to Maruku and/or RedCloth ;-) -- Thomas
On 2009-03-13, Thomas Leitner <t_leitner at gmx.at> wrote:> RDiscount is a Markdown-only parser but does not have the extensions > provided by Maruku. However, it is definitly the fastest option! And it > complies with the Markdown rules set by the original Markdown > implementation. So I would go for it!Actually, I''m not sure I want the extensions. I haven''t looked at them in detail yet, but one of the reasons I like markdown is that it''s the lightest of the "ASCII markup" language in syntax. I don''t like dodging a gazillion cases of special-case syntax everywhere, as most of these languages have.> Regarding the FAQ items: if I should help you, I need a little bit more > information on how the FAQ items are structured etc. RSS feed > generation is possible with webgen - see the documentation!It''s the Ion homepage http://iki.fi/tuomov/ion/faq.html, currently using Ikiwiki''s ''inline'' plugin to generate both feeds and pages containing full file contents and listings. I have individual FAQ entries in faq/entries/*.mdwn. These are fully included in faq/some_tag.mdwn based on tags set in the entry files themselves, as well as listed by heading in ''faq/entries.mdwn'' that also generates a feed. (The old version of Ikiwiki I''ve been using doesn''t support index.html.) I don''t necessarily need the tagging part. At minimum I need a way to list all the entries by title; basically an additional menu. For the news page, it would be very nice to be able to inline the contents. Perhaps even tagging could be implemented by support for multiple menus, and ''in_menu: bugs, features'' -- just one possibility, probably not the best. This is really all part of the planned blog features... -- Stop Gnomes and other pests! Purchase Windows today!
Am Fri, 13 Mar 2009 07:50:19 +0000 (UTC) schrieb Tuomo Valkonen <tuomov at iki.fi>:> On 2009-03-13, Thomas Leitner <t_leitner at gmx.at> wrote: > > RDiscount is a Markdown-only parser but does not have the extensions > > provided by Maruku. However, it is definitly the fastest option! > > And it complies with the Markdown rules set by the original Markdown > > implementation. So I would go for it! > > Actually, I''m not sure I want the extensions. I haven''t looked at > them in detail yet, but one of the reasons I like markdown is that > it''s the lightest of the "ASCII markup" language in syntax. I don''t > like dodging a gazillion cases of special-case syntax everywhere, > as most of these languages have.Kramdown will let you choose the used block and span level parsers. For example, you could select to use foot notes but not use fenced code blocks.> > Regarding the FAQ items: if I should help you, I need a little bit > > more information on how the FAQ items are structured etc. RSS feed > > generation is possible with webgen - see the documentation! > > It''s the Ion homepage http://iki.fi/tuomov/ion/faq.html, currently > using Ikiwiki''s ''inline'' plugin to generate both feeds and pages > containing full file contents and listings. > > I have individual FAQ entries in faq/entries/*.mdwn. These > are fully included in faq/some_tag.mdwn based on tags set > in the entry files themselves, as well as listed by heading > in ''faq/entries.mdwn'' that also generates a feed. > (The old version of Ikiwiki I''ve been using doesn''t support > index.html.)This could be done by using a meta information tags in the faq/entries/*.mdwn files and having a small ERB code fragment in faq/some_tag.mdwn which selects only those files in faq/entries/*.mdwn that have a certain tag set. Feed generation should be no problem.> I don''t necessarily need the tagging part. At minimum I > need a way to list all the entries by title; basically > an additional menu. For the news page, it would be very > nice to be able to inline the contents.As I said above, a small ERB fragment can be used to list the entries by title, description, ... Inlining content can be done by using the <webgen:block /> tag with a dynamically generated chain attribute, eg. <webgen:block name="content" chain="<%= entry.absolute_lcn %>" /> where `entry` refers to the node of the currently processed faq entry. -- Thomas
On 2009-03-13, Thomas Leitner <t_leitner at gmx.at> wrote:> As I said above, a small ERB fragment can be used to list the > entries by title, description, ... Inlining content can be done by > using the <webgen:block /> tag with a dynamically generated chain > attribute, eg. > > <webgen:block name="content" chain="<%= entry.absolute_lcn %>" /> > > where `entry` refers to the node of the currently processed faq entry.Hm... I''d very much prefer an existing extension/tag, or even ready snippet of code, to starting to learn Ruby/ERB/webgen internals at this point in time. (Would be quicker to write a custom shell script hack than something cleaner.) Already wasted too much time on computer/OS switch, and just want to get the site back into a condition where it can be updated. -- Tuomo
On 2009-03-13, Tuomo Valkonen <tuomov at iki.fi> wrote:>> entries by title, description, ... Inlining content can be done by >> using the <webgen:block /> tag with a dynamically generated chain >> attribute, eg. >> >> <webgen:block name="content" chain="<%= entry.absolute_lcn %>" /> >> >> where `entry` refers to the node of the currently processed faq entry. > > Hm... I''d very much prefer an existing extension/tag, or even ready > snippet of code,I think that nobody knows how to actually loop over the entries or whatever is needed to use that. -- In 1995, Linux was almost a bicycle; an alternative way of live to the Windows petrol beasts that had to be taken to the dealer for service. By 2008, Linux has bloated into a gas-guzzler, and local vendors and artisans have had to yield to "all under one roof" big box hypermarkets.
Am Thu, 26 Mar 2009 11:33:37 +0000 (UTC) schrieb Tuomo Valkonen <tuomov at iki.fi>:> On 2009-03-13, Tuomo Valkonen <tuomov at iki.fi> wrote: > >> entries by title, description, ... Inlining content can be done by > >> using the <webgen:block /> tag with a dynamically generated chain > >> attribute, eg. > >> > >> <webgen:block name="content" chain="<%= entry.absolute_lcn > >> %>" /> > >> > >> where `entry` refers to the node of the currently processed faq > >> entry. > > > > Hm... I''d very much prefer an existing extension/tag, or even ready > > snippet of code, > > I think that nobody knows how to actually loop over the entries or > whatever is needed to use that.This can be done by using ERB in page or template files (see the documentation for the ERB content processor). However, you would need basic knowledge of the Ruby programming language. -- Thomas
On 2009-03-28, Thomas Leitner <t_leitner at gmx.at> wrote:> This can be done by using ERB in page or template files (see the > documentation for the ERB content processor). However, you would need > basic knowledge of the Ruby programming language.Yes, I know that. But more importantly, I would have to learn the webgen internals, which I''m not really interested in doing. The documentation isn''t exactly straightforward. And if it''s not just a simple two-line for-loop or so, it''s really too much to embed... And I expect it to be a huge blob, because nobody just gives the answer. -- Tuomo
Am Sat, 28 Mar 2009 06:30:22 +0000 (UTC) schrieb Tuomo Valkonen <tuomov at iki.fi>:> On 2009-03-28, Thomas Leitner <t_leitner at gmx.at> wrote: > > This can be done by using ERB in page or template files (see the > > documentation for the ERB content processor). However, you would > > need basic knowledge of the Ruby programming language. > > Yes, I know that. But more importantly, I would have to learn > the webgen internals, which I''m not really interested in doing. > The documentation isn''t exactly straightforward. And if it''s > not just a simple two-line for-loop or so, it''s really too > much to embed... And I expect it to be a huge blob, because > nobody just gives the answer.It''s hard to provide a general solution for the problem. I have included a generic ERB script below that inserts links to all page files sorted by their `sort_info` meta information in a sub folder called `faqs`: <% context.content_node.tree[''/faqs''].children.select {|c| c[''kind''] == ''page''}.sort.each do |c| %> * <%= context.dest_node.link_to(c) %> <% end %> -- Thomas
Tuomo Valkonen
2009-Mar-29 07:22 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
On 2009-03-28, Thomas Leitner <t_leitner at gmx.at> wrote:> It''s hard to provide a general solution for the problem.That''s fine, just some template to get started with. (Much easier to start work fro templates than from scratch with too extensive documentation to read.)><% context.content_node.tree[''/faqs''].children.select {|c| c[''kind''] == ''page''}.sort.each do |c| %> > * <%= context.dest_node.link_to(c) %> ><% end %>Replacing the link_to -line with <webgen:block name="content" chain="<%= c.absolute_lcn %>" /> does not seem to be working. I get the path to the html in chain, but the tag just gets rendered, instead of expanded. I suspect rdiscount is mangling it. Indeed, I tried just running the page through both rdiscount and good old markdown, and the former mangled the starting < into < while the latter didn''t. Of course, the ERB stuff not being executed affects the results. Would it be possible to have this code as a separate unprocessed block or something? Or how difficult would it be to turn it into an extension/tag? One thing that came into my mind: Will this webgen:block stuff actually rebase the links? Another thing I''ve noticed that the feed extension seems to choose the 10 earliest entries! -- In 1995, Linux was almost a bicycle; an alternative way of live to the Windows petrol beasts that had to be taken to the dealer for service. By 2008, Linux has bloated into a gas-guzzler, and local vendors and artisans have had to yield to "all under one roof" big box hypermarkets.
Thomas Leitner
2009-Mar-29 14:37 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
> Replacing the link_to -line with > > <webgen:block name="content" chain="<%= c.absolute_lcn %>" /> > > does not seem to be working. I get the path to the html > in chain, but the tag just gets rendered, instead of expanded. > I suspect rdiscount is mangling it. Indeed, I tried just > running the page through both rdiscount and good old markdown, > and the former mangled the starting < into < while the > latter didn''t. Of course, the ERB stuff not being executed > affects the results. > > Would it be possible to have this code as a separate unprocessed > block or something? Or how difficult would it be to turn it > into an extension/tag?You can easily create a separate block for this. Just add a new block in your page file and specify the pipeline that you wish to use. For example, to allow only erb and webgen blocks processing you would do it like this: --- name:entries pipeline:erb,blocks <% context.content_node.tree[''/faqs''].children.select {|c| c[''kind''] == ''page''}.sort.each do |c| %> <webgen:block name="content" chain="<%= c.absolute_lcn %>" /> <% end %> Then you can include this block in the content section of your page file. However, since you will always need to use the block tag in the main content block, the rdiscount processor will always mangle it. So this seems to be a problem with the rdiscount processor and not webgen per se. Your second idea of using a special tag for this naturally also works, the code for it would look like this (put it into ext/init.rb): ---------------------------------------------------------------- config = Webgen::WebsiteAccess.website.config require ''webgen/tag'' class FAQEntriesTag include Webgen::Tag::Base def call(tag, body, context) result = '''' context.content_node.tree[''/faqs''].children.select {|c| c[''kind''] == ''page''}.sort.each do |c| context.dest_node.node_info[:used_nodes] << c.absolute_lcn result += c.node_info[:page].blocks[''content''].render(context.clone(:chain => [c])).content + "\n" end result end end config[''contentprocessor.tags.map''][''faqentries''] = ''FAQEntriesTag'' ---------------------------------------------------------------- This would create a tag called `faqentries`. Everytime it is used, it searches for all page files under the `/faqs` directory and inserts the rendered content of the found nodes into document. The third line of the method adds the found node to a special array sothat the page gets automatically re-generated when the node changes. The fourth line renders the found node.> One thing that came into my mind: Will this webgen:block stuff > actually rebase the links?Yes, it will correctly convert all webgen generated links into relative links. -- Thomas
Tuomo Valkonen
2009-Mar-29 16:44 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
On 2009-03-29, Thomas Leitner <t_leitner at gmx.at> wrote:> Your second idea of using a special tag for this naturally also works, > the code for it would look like this (put it into ext/init.rb): >This seems to be inserting the entries, but they''re incorrectly sorted, just like the feed. I have the dates set in created.metainfo this way: --- name:paths Released_ion-3rc-20071220.page: created_at: 2007-12-20T18:57:36Z modified_at: 2007-12-20T18:57:36Z Released_ion-3rc-20080103.page: created_at: 2008-01-03T18:27:27Z modified_at: 2008-01-03T18:27:27Z etc. Should this work? Rebasing also doesn''t seem to be happening. Both [download]({relocatable: /download.html}) and {link: ../download.html} end up pointing outside the target tree, i.e., are not altered. Also the title should be created (but maybe I''ll figure it out). -- Tuomo
Thomas Leitner
2009-Mar-29 17:39 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
Am Sun, 29 Mar 2009 16:44:20 +0000 (UTC) schrieb Tuomo Valkonen <tuomov at iki.fi>:> On 2009-03-29, Thomas Leitner <t_leitner at gmx.at> wrote: > > Your second idea of using a special tag for this naturally also > > works, the code for it would look like this (put it into > > ext/init.rb): > > > > This seems to be inserting the entries, but they''re incorrectly > sorted, just like the feed. I have the dates set in created.metainfo > this way: > > --- name:paths > Released_ion-3rc-20071220.page: > created_at: 2007-12-20T18:57:36Z > modified_at: 2007-12-20T18:57:36Z > Released_ion-3rc-20080103.page: > created_at: 2008-01-03T18:27:27Z > modified_at: 2008-01-03T18:27:27Z > > etc. Should this work?Yes, this should work. I tried it on a sample site and the dates are set correctly. However, webgen sorts nodes using the meta information sort_info and uses the title of a node as fallback. So, since the entries don''t appear to have the sort_info meta information set, they are sorted by their titles. If you want to sort by modification time, you need to replace the `.sort` call in the code from last mail with .sort {|a,b| a[''modified_at''] <=> b[''modified_at'']}> Rebasing also doesn''t seem to be happening. Both > [download]({relocatable: /download.html}) and > {link: ../download.html} end up pointing outside the target tree, > i.e., are not altered. Also the title should be created (but maybe > I''ll figure it out).The fragments are correct. For setting the title attribute of a link generated with the link tag, have a look at its documentation at http://webgen.rubyforge.org/documentation/tag/link.html . Are any warnings or errors displayed when you run webgen? Could you send me the sources for your website? This would greatly help figuring out why things are not working the way they should. -- Thomas
Tuomo Valkonen
2009-Mar-29 19:32 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
On 2009-03-29, Thomas Leitner <t_leitner at gmx.at> wrote:> .sort {|a,b| a[''modified_at''] <=> b[''modified_at'']}I had to change the order of and b in the test to make this work. The same change in feed.rb fixed feeds. The result is as follows (sorry, no proper attachment; reading through gmane with slrn, which has no support): --- config = Webgen::WebsiteAccess.website.config require ''webgen/tag'' class InlineTag include Webgen::Tag::Base def call(tag, body, context) pages = param(''tag.inline.pages'') count = param(''tag.inline.count'') result = '''' nodes = context.content_node.tree[pages].children.\ select {|c| c[''kind''] == ''page''}.\ sort {|a,b| b[''created_at''] <=> a[''created_at'']} (count == 0 ? nodes : nodes[0,count]).each do |c| context.dest_node.node_info[:used_nodes] << c.absolute_lcn result += "<div class=\"inlinepage\">\n<h2>" \ + context.dest_node.link_to(c) + "</h2>\n" \ + c.node_info[:page].blocks[''content''].render(context.clone(:chain => [c])).content \ + "\n<span class=\"pageinfo\">Posted " \ + c[''created_at''].strftime("%Y-%m-%d %H:%M") \ + "</span>\n</div>\n" end result end end config[''contentprocessor.tags.map''][''inline''] = ''InlineTag'' config.tag.inline.pages("/news", :doc => ''page directory'', :mandatory => ''default'') config.tag.inline.count(0, :doc => ''page count'') --- However, the parameters aren''t being recognised. If I remove the "/news" default, I get undefined method `children'' for nil:NilClass and with it, I still get WARN -- Invalid parameter ''count'' for tag ''InlineTag'' in </news.en.html> WARN -- Invalid parameter ''pages'' for tag ''InlineTag'' in </news.en.html>> The fragments are correct. For setting the title attribute of a link > generated with the link tag, have a look at its documentation at > http://webgen.rubyforge.org/documentation/tag/link.html . Are any > warnings or errors displayed when you run webgen? > > Could you send me the sources for your website? This would greatly help > figuring out why things are not working the way they should.There isn''t much to it. Basically: src/news.page: {inline: {pages: /news, count: 3}} src/news/Released_xxxx.page: ([download]({relocatable: /download.html})) or {link: ../download.html} (plus title in metadata section, and created/modified date in src/news/created.metainfo, extracted from version control system). Neither of these link types get rebased for inclusion in the news.html one directory up. -- Stop Gnomes and other pests! Purchase Windows today!
Thomas Leitner
2009-Mar-30 09:04 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
> However, the parameters aren''t being recognised. If I remove the > "/news" default, I get > > undefined method `children'' for nil:NilClass > > and with it, I still get > > WARN -- Invalid parameter ''count'' for tag ''InlineTag'' in > </news.en.html> WARN -- Invalid parameter ''pages'' for tag ''InlineTag'' > in </news.en.html>The resolution of the configuration parameters is done via the class name of a tag but it seems that I have forgotten to mention this in the API documentation - will fix it. So basically, if you have a class called InlineTag, the default mechanism searches for options under inlinetag, ie. you have to set the options this way: config.inlinetag.pages("/news", :doc => ''page directory'', :mandatory => ''default'') config.inlinetag.count(0, :doc => ''page count'') Then the configuration options are found. Note that you also have to change param(''tag.inline.pages'') param(''tag.inline.count'') to param(''inlinetag.pages'') param(''inlinetag.count'') Or you can name your tag class Tag::Inline - then you don''t have to change the rest as stated above.> There isn''t much to it. Basically: > > src/news.page: > > {inline: {pages: /news, count: 3}} > > src/news/Released_xxxx.page: > > ([download]({relocatable: /download.html})) > > or > > {link: ../download.html} > > (plus title in metadata section, and created/modified date in > src/news/created.metainfo, extracted from version control system). > > Neither of these link types get rebased for inclusion in the > news.html one directory up.That''s my fault, did not code correctly. Replace the corresponding line with the following + c.node_info[:page].blocks[''content''].render(context.clone(:chain => [c], :dest_node => context.dest_node || context.content_node)).content \ This sets the extra information :dest_node on the clone context. This information is needed for the rebasing when the rendered node and the output node are not the same. I have tested the above changes and they work with 0.5.7. -- Thomas
Tuomo Valkonen
2009-Mar-30 09:52 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
On 2009-03-30, Thomas Leitner <t_leitner at gmx.at> wrote:> I have tested the above changes and they work with 0.5.7.I will try these later. One thing that popped to my mind, though: would it be possible to extend the feed plugin to define a block of the feed items (in the style of my init.rb) for inclusion in other pages? That would seem cleaner than defining both inline and feed separately... although of some inlines I don''t want a feed of. It''s something to consider anyway, if the blog features are to be extended. I should in any case get my site to a working condition if the mentioned fixes work. -- "[Fashion] is usually a form of ugliness so intolerable that we have to alter it every six months." -- Oscar Wilde "The computer industry is the only industry that is more fashion-driven than women''s fashion." -- RMS
Thomas Leitner
2009-Mar-30 15:02 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
Am Mon, 30 Mar 2009 09:52:57 +0000 (UTC) schrieb Tuomo Valkonen <tuomov at iki.fi>:> On 2009-03-30, Thomas Leitner <t_leitner at gmx.at> wrote: > > I have tested the above changes and they work with 0.5.7. > > I will try these later. One thing that popped to my mind, though: > would it be possible to extend the feed plugin to define a block > of the feed items (in the style of my init.rb) for inclusion in > other pages? That would seem cleaner than defining both inline > and feed separately... although of some inlines I don''t want a > feed of. > > It''s something to consider anyway, if the blog features are to be > extended. I should in any case get my site to a working condition > if the mentioned fixes work.I''m thinking about providing an easy method for selecting an arbitrary set of nodes for further processing. It will allow selecting nodes by different criterias, sorting them and do everything else that is needed (hopefully). Then this method will be used for all such things like selecting nodes for feeds, for menus, ... -- Thomas
Tuomo Valkonen
2009-Mar-30 17:12 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
On 2009-03-30, Tuomo Valkonen <tuomov at iki.fi> wrote:> On 2009-03-30, Thomas Leitner <t_leitner at gmx.at> wrote: >> I have tested the above changes and they work with 0.5.7. > > I will try these later.Ok, with these fixes things seem to work. There''s one minor bug/annoying feature that I noted: if I add a virtual (index) page, pages referring to it (through from the breadcrumb trail) won''t be updated. (I''m not going to start moving pages around, and since ikiwiki had index for /foo/ as /foo.html, I''m adding a virtual /foo/index.html referring to /foo.html. This makes it easier with the selection of pages for feeds/inlines too.) -- "[Fashion] is usually a form of ugliness so intolerable that we have to alter it every six months." -- Oscar Wilde "The computer industry is the only industry that is more fashion-driven than women''s fashion." -- RMS
Thomas Leitner
2009-Mar-31 08:34 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
> There''s one minor bug/annoying feature that I noted: if I add > a virtual (index) page, pages referring to it (through from the > breadcrumb trail) won''t be updated. (I''m not going to start > moving pages around, and since ikiwiki had index for /foo/ as > /foo.html, I''m adding a virtual /foo/index.html referring to > /foo.html. This makes it easier with the selection of pages > for feeds/inlines too.)Okay, I have tried to reproduce this with the following setup: /index.page /foo.page /foo /virtual Contents of index.page: A link to {link: foo/index.html} Contents of virtual: foo/index.html: title: My Kung Foo Then the whole site is rendered. When changing meta information associated with the virtual file (e.g. the title), the link in `index.page` is not updated. This is certainly not the intended behaviour - is this what you mean? I have fixed the above behaviour and unconvered some other lurking bugs on the way - the fixes are available with the next release! -- Thomas
Tuomo Valkonen
2009-Mar-31 15:46 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
On 2009-03-31, Thomas Leitner <t_leitner at gmx.at> wrote:> Contents of virtual: > > foo/index.html: > title: My Kung Foo > > Then the whole site is rendered. When changing meta information > associated with the virtual file (e.g. the title), the link in > `index.page` is not updated. This is certainly not the intended > behaviour - is this what you mean?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. -- Tuomo
Thomas Leitner
2009-Apr-01 04:51 UTC
[webgen-users] Aggregate pages and feeds [Was: Re: Markdown support?]
> 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