Changing the output_path_style

To have a page generate a file with a custom extension, set the output_path_style in a metainfo backing file or in the page's header block.

Set any relocatable links to point at the default output path name for the processor of the source file, not the customized output path name.

For intance, for a .page file, use .html, not the custom extension. The Relocatable processor will use the correct output_path_style for the link:


--- name:paths
  output_path_style: [:parent, :basename, ".myext", [".", :lang]]


This file will be named file.myext in the output.


But relocatable [links]({relocatable: /path/to/my/file.html}) should use the 
Page handler's default extension, ".html"


On Debian, the RubyGems version is way too old to be useful, so we'll need to replace it. First install Ruby and RubyGems via apt, then upgrade to the latest RubyGems manually. Unfortunately, installing via apt first is necessary.

# aptitude install ruby rubygems

Go to RubyForge and get the latest RubyGems tarball. Install it:

$ tar xvfz rubygems-1.5.2.tgz
$ cd rubygems-1.5.2
$ sudo ruby setup.rb

gem -v should now show the latest version.

Now install webgen using gem, not apt. You'll also need rake:

$ sudo gem install webgen rake

That should be it. Note that I'm explicitly showing using gem via sudo to emphasize that you need to install as root to avoid installing rake and webgen only for your current user (which gem will do automatically unless watched closely).