- return htmllink($page, $destpage, $link, %opts);
-} #}}}
+ my $tagfile = newpagefile($tagpage, $config{default_pageext});
+
+ add_autofile($tagfile, "tag", sub {
+ my $message=sprintf(gettext("creating tag page %s"), $tagpage);
+ debug($message);
+
+ my $template=template("autotag.tmpl");
+ $template->param(tagname => IkiWiki::basename($tag));
+ $template->param(tag => $tag);
+ writefile($tagfile, $config{srcdir}, $template->output);
+ if ($config{rcs}) {
+ IkiWiki::disable_commit_hook();
+ IkiWiki::rcs_add($tagfile);
+ IkiWiki::rcs_commit_staged($message, undef, undef);
+ IkiWiki::enable_commit_hook();
+ }
+ });
+ }
+}