Kwiki Mod

Wiki-style page titles don't seem to be Google-able so I made some modifications to expand them into space-separated words. I accidentally blew this away after a dist-upgrade so here's now I figured out how to do it, again.

In /usr/share/perl5/Kwiki/

 sub spaced_page_name {
    my $name = $self->{page_name};
    $name =~ s/([a-z])([A-Z])/$1 $2/g;
    return $name;

In template/tt2/kwiki_begin.html change

  [% hub.cgi.page_name %] -


  [% hub.cgi.spaced_page_name %] -

In kwiki_screen.html change

 <div id="title_pane">
  <h1>[% screen_title || self.class_title %]</h1>


 <div id="title_pane">
  <h1>[% hub.cgi.spaced_page_name || screen_title || self.class_title %]</h1>

Add Google Analytics code in template/tt2/kwiki_end.html.

I managed to nuke it again in another dist-upgrade and couldn't resurrect it quickly, so I've since ditched kwiki.