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/CGI.pm

 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 %] -

to

  [% hub.cgi.spaced_page_name %] -

In kwiki_screen.html change

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

to

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

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.