]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
Merge branch 'master' of ssh://git.kitenet.net/srv/git/ikiwiki.info
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index b4030307847fd0392a848da51330ff40db15889b..c7107d6645504c7939c37df2b5ab8caebcabb445 100644 (file)
@@ -153,11 +153,6 @@ sub preprocess_inline (@) { #{{{
        # that if they are removed or otherwise changed, the inline will be
        # sure to be updated.
        add_depends($params{page}, join(" or ", @list));
-       # Force a scan of this page so any metadata that appears after this
-       # inline directive is available when inlining. The page normally 
-       # wouldn't be scanned if it's only being rebuilt because of a
-       # depedency.
-       IkiWiki::scan($pagesources{$params{page}});
 
        my $feednum="";
 
@@ -291,7 +286,8 @@ sub preprocess_inline (@) { #{{{
                        will_render($params{destpage}, $rssp);
                        if (! $params{preview}) {
                                writefile($rssp, $config{destdir},
-                                       genfeed("rss", $rssurl, $desc, $params{destpage}, @list));
+                                       genfeed("rss",
+                                               $config{url}."/".rsspage($params{destpage}).$feednum, $desc, $params{destpage}, @list));
                                $toping{$params{destpage}}=1 unless $config{rebuild};
                                $feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/rss+xml" title="RSS" href="$rssurl" />};
                        }
@@ -301,7 +297,7 @@ sub preprocess_inline (@) { #{{{
                        will_render($params{destpage}, $atomp);
                        if (! $params{preview}) {
                                writefile($atomp, $config{destdir},
-                                       genfeed("atom", $atomurl, $desc, $params{destpage}, @list));
+                                       genfeed("atom", $config{url}."/".atompage($params{destpage}).$feednum, $desc, $params{destpage}, @list));
                                $toping{$params{destpage}}=1 unless $config{rebuild};
                                $feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/atom+xml" title="Atom" href="$atomurl" />};
                        }
@@ -367,8 +363,8 @@ sub absolute_urls ($$) { #{{{
        $url=~s/[^\/]+$//;
        
        $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(#[^"]+)"/$1 href="$baseurl$2"/mig;
-       $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(?!\w+:\/\/)([^"]+)"/$1 href="$url$2"/mig;
-       $content=~s/(<img(?:\s+(?:class|id|width|height)\s*="?\w+"?)*)\s+src=\s*"(?!\w+:\/\/)([^"]+)"/$1 src="$url$2"/mig;
+       $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(?!\w+:)([^"]+)"/$1 href="$url$2"/mig;
+       $content=~s/(<img(?:\s+(?:class|id|width|height)\s*="?\w+"?)*)\s+src=\s*"(?!\w+:)([^"]+)"/$1 src="$url$2"/mig;
        return $content;
 } #}}}