X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9982862925627d4714ed8b61d8b591950ed5aaa5..c91b39fdb52c935fbca20ca55a256278f4661a5b:/IkiWiki.pm?ds=sidebyside diff --git a/IkiWiki.pm b/IkiWiki.pm index bbe1ad055..ef8ccb2da 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1068,6 +1068,14 @@ sub baseurl (;$) { return $page; } +sub urlabs ($$) { + my $url=shift; + my $urlbase=shift; + + eval q{use URI}; + URI->new_abs($url, $urlbase)->as_string; +} + sub abs2rel ($$) { # Work around very innefficient behavior in File::Spec if abs2rel # is passed two relative paths. It's much faster if paths are @@ -1931,7 +1939,7 @@ sub misctemplate ($$;@) { title => $title, wikiname => $config{wikiname}, content => $content, - baseurl => baseurl(), + baseurl => $config{url}.'/', html5 => $config{html5}, %params, ); @@ -2033,7 +2041,7 @@ sub rcs_recentchanges ($) { $hooks{rcs}{rcs_recentchanges}{call}->(@_); } -sub rcs_diff ($) { +sub rcs_diff ($;$) { $hooks{rcs}{rcs_diff}{call}->(@_); }