]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/meta.pm
* Various CSS and formatting changes.
[ikiwiki.git] / IkiWiki / Plugin / meta.pm
index bac16346932d2a00e1bc034d500a1fe8a08abebb..adfd688a6aeece5cdf1f55b8578727ffbc111369 100644 (file)
@@ -8,6 +8,9 @@ use IkiWiki;
 
 my %meta;
 my %title;
+my %permalink;
+my %author;
+my %authorurl;
 
 sub import { #{{{
        IkiWiki::hook(type => "preprocess", id => "meta", 
@@ -57,9 +60,18 @@ sub preprocess (@) { #{{{
        elsif ($key eq 'title') {
                $title{$page}=$value;
        }
+       elsif ($key eq 'permalink') {
+               $permalink{$page}=$value;
+       }
        else {
                $meta{$page}.="<meta name=\"".encode_entities($key).
                        "\" content=\"".encode_entities($value)."\" />\n";
+               if ($key eq 'author') {
+                       $author{$page}=$value;
+               }
+               elsif ($key eq 'authorurl') {
+                       $authorurl{$page}=$value;
+               }
        }
 
        return "";
@@ -74,6 +86,13 @@ sub pagetemplate (@) { #{{{
                if exists $meta{$page} && $template->query(name => "meta");
        $template->param(title => $title{$page})
                if exists $title{$page} && $template->query(name => "title");
+       $template->param(permalink => $permalink{$page})
+               if exists $permalink{$page} && $template->query(name => "permalink");
+       $template->param(author => $author{$page})
+               if exists $author{$page} && $template->query(name => "author");
+       $template->param(authorurl => $authorurl{$page})
+               if exists $authorurl{$page} && $template->query(name => "authorurl");
+       
 } # }}}
 
 1