my %permalink;
my %author;
my %authorurl;
+my %license;
+my %copyright;
sub import { #{{{
hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
delete $params{$key};
my $page=$params{page};
delete $params{page};
+ my $destpage=$params{destpage};
delete $params{destpage};
delete $params{preview};
$meta{$page}.='<link href="'.encode_entities($value).
"\" rel=\"openid.delegate\" />\n";
}
+ elsif ($key eq 'license') {
+ $meta{$page}.="<link rel=\"license\" href=\"#page_license\" />\n";
+ $license{$page}=IkiWiki::linkify($page, $destpage, $value);
+ }
+ elsif ($key eq 'copyright') {
+ $meta{$page}.="<link rel=\"copyright\" href=\"#page_copyright\" />\n";
+ $copyright{$page}=IkiWiki::linkify($page, $destpage, $value);
+ }
else {
$meta{$page}.=scrub("<meta name=\"".encode_entities($key).
"\" content=\"".encode_entities($value)."\" />\n");
if exists $author{$page} && $template->query(name => "author");
$template->param(authorurl => $authorurl{$page})
if exists $authorurl{$page} && $template->query(name => "authorurl");
+ $template->param(license => $license{$page})
+ if exists $license{$page} && $template->query(name => "license");
+ $template->param(copyright => $copyright{$page})
+ if exists $copyright{$page} && $template->query(name => "copyright");
} # }}}
format. Included many details not previously listed in the old file.
* inline: add feedonly option, set feedonly=yes to get only the feed button
but not inline the pages.
+ * meta: Support license and copyright information. The information will
+ be shown in the page footer. HTML will also be inserted that should
+ support the rel=license microformat as well as the HTML spec's
+ rel=copyright.
- -- Joey Hess <joeyh@debian.org> Thu, 13 Sep 2007 18:07:51 -0400
+ -- Joey Hess <joeyh@debian.org> Fri, 14 Sep 2007 13:05:22 -0400
ikiwiki (2.7) unstable; urgency=low
* license
- Specifies a copyright license for the page, for example, "GPL".
+ Specifies a license for the page, for example, "GPL". Can contain
+ WikiLinks.
+
+* copyright
+
+ Specifies the copyright of the page, for example, "Copyright 2007 by
+ Joey Hess". Can contain WikiLinks.
* author
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-09-13 18:22-0400\n"
+"POT-Creation-Date: 2007-09-14 14:10-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)"
msgstr ""
-#: ../IkiWiki/Plugin/meta.pm:88
+#: ../IkiWiki/Plugin/meta.pm:92
msgid "stylesheet not found"
msgstr ""
</span>
</TMPL_IF>
+<TMPL_IF COPYRIGHT>
+<div class="copyright">
+<a name="page_copyright"></a>
+<TMPL_VAR COPYRIGHT>
+</div>
+</TMPL_IF>
+
+<TMPL_IF LICENSE>
+<div class="license">
+<a name="page_license"></a>
+License: <TMPL_VAR LICENSE>
+</div>
+</TMPL_IF>
+
<TMPL_IF NAME="HAVE_ACTIONS">
<div class="actions">
<ul>
</div>
</TMPL_IF>
+<TMPL_IF COPYRIGHT>
+<div class="copyright">
+<a name="page_copyright"></a>
+<TMPL_VAR COPYRIGHT>
+</div>
+</TMPL_IF>
+
+<TMPL_IF LICENSE>
+<div class="license">
+<a name="page_license"></a>
+License: <TMPL_VAR LICENSE>
+</div>
+</TMPL_IF>
+
<div class="pagedate">
Last edited <TMPL_VAR NAME=MTIME>
</div>