From: Joey Hess Date: Wed, 4 Jun 2008 02:11:33 +0000 (-0400) Subject: prettify page names, and drop the redunadant url display X-Git-Tag: 2.49~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=18b0aa1f13b61f460b4775567df909fa6d8d2e50;p=ikiwiki.git prettify page names, and drop the redunadant url display --- diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 3e3e9dfab..fc77a7d2f 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -68,11 +68,14 @@ sub filter (@) { #{{{ # index page my $db=xapiandb(); my $doc=Search::Xapian::Document->new(); - my $title=$params{page}; + my $title; if (exists $pagestate{$params{page}}{meta} && exists $pagestate{$params{page}}{meta}{title}) { $title=$pagestate{$params{page}}{meta}{title}; } + else { + $title=IkiWiki::pagetitle($params{page}); + } # data used by omega $doc->set_data( diff --git a/templates/searchquery.tmpl b/templates/searchquery.tmpl index dd12d2970..33a7cb6fa 100644 --- a/templates/searchquery.tmpl +++ b/templates/searchquery.tmpl @@ -76,7 +76,6 @@ $if{$field{size},Size: $html{$filesiz $html{$or{$field{caption},$field{title},$field{url},Untitled}}
$highlight{$field{sample},$terms}$if{$field{sample},...}
-$html{$field{url}}
$percentage% relevant$. matching: $list{$map{$terms,$html{$prettyterm{$_}}},$. , and }${for lynx:}

}