summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-10-10 19:15:25 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-10-10 19:15:25 +0000
commit248c60d501b00b9fb0a9655a57487597cfaa561a (patch)
treee0a7f7d8a12da3510b82b86b372f90651ce96d2a /doc
parent3945473f8a0284066c8751940299fa9153efd0a7 (diff)
web commit by http://subvert.org.uk/~bma/: Add a patch to the Meta plugin to allow inclusion of CVS/SVN-style $Id$ or similar keywords.
Diffstat (limited to 'doc')
-rw-r--r--doc/todo/meta_rcsid.mdwn32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/todo/meta_rcsid.mdwn b/doc/todo/meta_rcsid.mdwn
new file mode 100644
index 000000000..400c8637d
--- /dev/null
+++ b/doc/todo/meta_rcsid.mdwn
@@ -0,0 +1,32 @@
+The following patch adds an 'rcsid' parameter to the Meta plugin, to allow inclusion
+of CVS/SVN-style keywords (like '$Id$', etc.) from the source file in the page template.
+
+ --- meta.pm.orig 2007-10-10 19:57:04.000000000 +0100
+ +++ meta.pm 2007-10-10 20:07:37.000000000 +0100
+ @@ -13,6 +13,7 @@
+ my %authorurl;
+ my %license;
+ my %copyright;
+ +my %rcsid;
+
+ sub import { #{{{
+ hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
+ @@ -110,6 +111,9 @@
+ $meta{$page}.="<link rel=\"copyright\" href=\"#page_copyright\" />\n";
+ $copyright{$page}=$value;
+ }
+ + elsif ($key eq 'rcsid') {
+ + $rcsid{$page}=$value;
+ + }
+ else {
+ $meta{$page}.=scrub("<meta name=\"".encode_entities($key).
+ "\" content=\"".encode_entities($value)."\" />\n");
+ @@ -142,6 +146,8 @@
+ if exists $author{$page} && $template->query(name => "author");
+ $template->param(authorurl => $authorurl{$page})
+ if exists $authorurl{$page} && $template->query(name => "authorurl");
+ + $template->param(rcsid => $rcsid{$page})
+ + if exists $rcsid{$page} && $template->query(name => "rcsid");
+
+ if ($page ne $destpage &&
+ ((exists $license{$page} && ! exists $license{$destpage}) ||