diff options
-rw-r--r-- | IkiWiki/Plugin/search.pm | 5 | ||||
-rw-r--r-- | 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},<span title="$html{$field{size}} bytes">Size: <b>$html{$filesiz </td> <td><B><A HREF="$field{url}">$html{$or{$field{caption},$field{title},$field{url},Untitled}}</A></B><BR> <small>$highlight{$field{sample},$terms}$if{$field{sample},...}</small><br> -<A HREF="$field{url}">$html{$field{url}}</A><br> <small> $percentage% relevant$. matching: <i>$list{$map{$terms,$html{$prettyterm{$_}}},$. ,</i> and <i>}</i></small>${for lynx:}<p></td></tr>} |