Chad Woolley
2008-Oct-25 17:09 UTC
[webgen-users] How do I make non-webgen-generated pages show up in menu?
This metainfo entry used to work to make my rdoc show up as a menu entry, but now it does not: code/rdoc: url: rdoc/index.html in_menu: true title: Rdoc sort_info: 30 Feel free to point me to the docs, I looked for a bit and could not find it. Thanks, -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/webgen-users/attachments/20081025/31c4f344/attachment-0001.html>
Thomas Leitner
2008-Oct-25 22:34 UTC
[webgen-users] How do I make non-webgen-generated pages show up in menu?
Am Sat, 25 Oct 2008 10:09:37 -0700 schrieb "Chad Woolley" <thewoolleyman at gmail.com>:> This metainfo entry used to work to make my rdoc show up as a menu > entry, but now it does not: > > code/rdoc: > url: rdoc/index.html > in_menu: true > title: Rdoc > sort_info: 30 > > Feel free to point me to the docs, I looked for a bit and could not > find it.Creation of virtual nodes has been extracted to its own source handler which handles .virtual files. Have a look at http://webgen.rubyforge.org/documentation/sourcehandler/virtual.html The entry should be in the menu again once you put the above fragment into a .virtual file. -- Thomas
Chad Woolley
2008-Oct-26 06:16 UTC
[webgen-users] How do I make non-webgen-generated pages show up in menu?
On Sat, Oct 25, 2008 at 3:34 PM, Thomas Leitner <t_leitner at gmx.at> wrote:> Creation of virtual nodes has been extracted to its own source handler > which handles .virtual files. Have a look at > http://webgen.rubyforge.org/documentation/sourcehandler/virtual.html > > The entry should be in the menu again once you put the above fragment > into a .virtual file. >I''m sorry, but I still cannot make it work after reading the above documentation and trying several different ways. Can you explain some more? So, say I want http://myhost.com/api.html to show up in my menu under docs/api. 1. What exactly should be in my metainfo file, if anything? I tried nothing, since the doc page above does not mention metainfo 2. Where should I create a .virtual file, and what should it be named? Should it be src/docs/api.virtual? I tried this 3. What exactly should be the contents of the virtual file? This is what I tried, but I get the error "can''t convert String into Hash" \--- !omap - /api/api.html: title: Api url: http://myhost.com/api.html in_menu: true 4. What do I have to do different for a file that actually exists, but is not generated by webgen? Say I generated src/docs/code_coverage.html - how exactly do I make that show up in the menu? Do I still need a .virtual file somewhere? Thanks, -- Chad -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/webgen-users/attachments/20081025/263dc6c1/attachment.html>
Thomas Leitner
2008-Oct-26 11:04 UTC
[webgen-users] How do I make non-webgen-generated pages show up in menu?
Am Sat, 25 Oct 2008 23:16:26 -0700 schrieb "Chad Woolley" <thewoolleyman at gmail.com>:> On Sat, Oct 25, 2008 at 3:34 PM, Thomas Leitner <t_leitner at gmx.at> > wrote: > > > Creation of virtual nodes has been extracted to its own source > > handler which handles .virtual files. Have a look at > > http://webgen.rubyforge.org/documentation/sourcehandler/virtual.html > > > > The entry should be in the menu again once you put the above > > fragment into a .virtual file. > > > > > I''m sorry, but I still cannot make it work after reading the above > documentation and trying several different ways. Can you explain > some more? > > So, say I want http://myhost.com/api.html to show up in my menu under > docs/api.I assume that you have a directory /docs/ and that your URL should appear as sub entry under this directory.> 1. What exactly should be in my metainfo file, if anything? I tried > nothing, since the doc page above does not mention metainfoIf you want to add a node for an external URL you just need a virtual file. For your example URL you would create a /virtual file with the following contents: /docs/api: url: http://myhost.com/api.html title: API documentation in_menu: true> 2. Where should I create a .virtual file, and what should it be named? > Should it be src/docs/api.virtual? I tried thisYou can either create a file called "virtual" in any directory or a file with the extension ".virtual". Creating a src/docs/api.virtual is fine, then the contents would be: api: url: http://myhost.com/api.html title: API documentation in_menu: true The path keys (in the above case "api") are always taken relatively to the directory the virtual file is in except if a path starts with a slash).> 3. What exactly should be the contents of the virtual file? This is > what I tried, but I get the error "can''t convert String into Hash" > > \--- !omap > - /api/api.html: > title: Api > url: http://myhost.com/api.html > in_menu: trueThe problem with the above is that the attributes title, url and in_menu needed to have additional spaces before them sothat YAML knows that these are the names of keys, like this: \--- !omap - /api/api.html: title: Api url: http://myhost.com/api.html in_menu: true Apart from that the entry is valid.> 4. What do I have to do different for a file that actually exists, > but is not generated by webgen? Say I generated > src/docs/code_coverage.html - how exactly do I make that show up in > the menu? Do I still need a .virtual file somewhere?If you generated this file into the src/ directory and told webgen to handle it (for example, by copying it to the output directory), you won''t need a virtual file. Then you would probably just need a metainfo file to add meta info entries for this file (in_menu, sort_info, ...). If you didn''t generate this file into the src directory, then you would need to add a virtual file. -- Thomas