Is there any way to stop the relocatable-tag appending index.html to directory references? -- Be an early adopter! Beat the herd! Choose Windows today!
> Is there any way to stop the relocatable-tag appending > index.html to directory references?Yes, just add this to your config.yaml: default_meta_info: Directory: index_path: ~ This tells webgen that no directory has an index path and therefore all paths to directories generated by webgen won''t have the index.html appended. Also see: http://webgen.rubyforge.org/documentation/manual.html#website-configfile http://webgen.rubyforge.org/documentation/sourcehandler/directory.html -- Thomas
On 2009-08-19, Thomas Leitner <t_leitner at gmx.at> wrote:>> Is there any way to stop the relocatable-tag appending >> index.html to directory references? > > Yes, just add this to your config.yaml: > > default_meta_info: > Directory: > index_path: ~Ah. I actually came across that option myself, and tried setting it to various values, but saw no mention of ~. Maybe it should be documented better? -- Stop Gnomes and other pests! Purchase Windows today! http://iki.fi/tuomov/b/archives/2009/07/21/T17_26_09/
Am Mon, 24 Aug 2009 18:41:31 +0000 (UTC) schrieb Tuomo Valkonen <tuomov at iki.fi>:> On 2009-08-19, Thomas Leitner <t_leitner at gmx.at> wrote: > >> Is there any way to stop the relocatable-tag appending > >> index.html to directory references? > > > > Yes, just add this to your config.yaml: > > > > default_meta_info: > > Directory: > > index_path: ~ > > Ah. I actually came across that option myself, and > tried setting it to various values, but saw no mention > of ~. Maybe it should be documented better?The tilde is actually part of the YAML syntax and stands for a nil value. You can find some info about the usage of the tilde with the directory handler on http://webgen.rubyforge.org/documentation/sourcehandler/directory.html -- Thomas
On 2009-08-24, Tuomo Valkonen <tuomov at iki.fi> wrote:> On 2009-08-19, Thomas Leitner <t_leitner at gmx.at> wrote: >>> Is there any way to stop the relocatable-tag appending >>> index.html to directory references? >> >> Yes, just add this to your config.yaml: >> >> default_meta_info: >> Directory: >> index_path: ~ > > Ah. I actually came across that option myself, and > tried setting it to various values, but saw no mention > of ~. Maybe it should be documented better?Actually, this doesn''t do everything that I wanted. feed.rb links are still to index.html, as are any links I''ve tried generating with my ''inline'' hacks. But if I try generate links to the directories themselves, the titles will be wrong now. I want the index.html to disappear entirely from any generated links, but without having to see extra trouble to getting the titles etc. right. So basically the index.html should be filtered at the last stage of link-generation. -- "[Fashion] is usually a form of ugliness so intolerable that we have to alter it every six months." -- Oscar Wilde
On 2009-08-26, Tuomo Valkonen <tuomov at iki.fi> wrote:> Actually, this doesn''t do everything that I wanted. > feed.rb links are still to index.html, as are any > links I''ve tried generating with my ''inline'' hacks. > But if I try generate links to the directories themselves, > the titles will be wrong now. > > I want the index.html to disappear entirely from any > generated links, but without having to see extra > trouble to getting the titles etc. right. So basically > the index.html should be filtered at the last stage > of link-generation.The following hacks seem to do what I want. Any chances of getting them in, configurable? node.rb: Add to the Node class def link_path index_path = @parent.meta_info[''index_path''] (@parent.path + index_path == @path ? @parent.path : @path) end In route_to, use link_path instead of path in other_url = if other.kind_of?(Node) self.class.url(other.routing_node(@lang).link_path) passive_sources/templates/rss_feed.template and atom_feed.template: Likewise, change references to entry.path to entry.link_path -- Off the dope since 2009; http://iki.fi/tuomov/b/archives/2009/07/21/T17_26_09/
On 2009-08-27, Tuomo Valkonen <tuomov at iki.fi> 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
> 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
On 2009-09-08, Thomas Leitner <t_leitner at gmx.at> 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.)