From 18b0aa1f13b61f460b4775567df909fa6d8d2e50 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 3 Jun 2008 22:11:33 -0400 Subject: [PATCH] prettify page names, and drop the redunadant url display --- IkiWiki/Plugin/search.pm | 5 ++++- templates/searchquery.tmpl | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) 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:}

} -- 2.26.2