]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
support [[linktext|pagename]] links
[ikiwiki.git] / IkiWiki / Render.pm
index e6d0bc510bf8a8cfd9ee91e5352293c48143cb44..504edc843cc8d7e6693822659ac2477c39798d13 100644 (file)
@@ -9,7 +9,8 @@ sub linkify ($$) { #{{{
        my $page=shift;
 
        $content =~ s{(\\?)$config{wiki_link_regexp}}{
-               $1 ? "[[$2]]" : htmllink($page, $2)
+               $2 ? ( $1 ? "[[$2|$3]]" : htmllink($page, $3, 0, 0, pagetitle($2)))
+                  : ( $1 ? "[[$3]]" :    htmllink($page, $3))
        }eg;
        
        return $content;
@@ -215,7 +216,7 @@ sub genpage ($$$) { #{{{
        }
 
        if ($config{rss} && $inlinepages{$page}) {
-               $template->param(rssurl => rsspage($page));
+               $template->param(rssurl => rsspage(basename($page)));
        }
        
        $template->param(
@@ -266,8 +267,6 @@ sub genrss ($$$) { #{{{
                my $parentpage=shift;
                my %params=@_;
                
-               return "" if exists $params{archive} && $params{archive} eq 'yes';
-               
                if (! exists $params{show}) {
                        $params{show}=10;
                }
@@ -326,7 +325,7 @@ sub findlinks ($$) { #{{{
 
        my @links;
        while ($content =~ /(?<!\\)$config{wiki_link_regexp}/g) {
-               push @links, lc($1);
+               push @links, lc($2);
        }
        # Discussion links are a special case since they're not in the text
        # of the page, but on its template.