diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-12 10:43:22 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-12 10:43:22 -0400 |
commit | 0fe87efc348643e30405f2d50c8498c971b99af4 (patch) | |
tree | 022daf42e8750b7dd5e1eb7a3b4d7874530fed8d /IkiWiki/Plugin/meta.pm | |
parent | a0f596b6ed4594011b07cf7af2d2d55aa78d8be1 (diff) | |
parent | 9c6444bf681ec48e3832282906d1d2cfad586cb5 (diff) |
Merge commit 'smcv/force-uuids' into force-uuids
Diffstat (limited to 'IkiWiki/Plugin/meta.pm')
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 671060fbf..02c99e9f6 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -84,6 +84,16 @@ sub preprocess (@) { #{{{ $pagestate{$page}{meta}{description}=HTML::Entities::encode_numeric($value); # fallthrough } + elsif ($key eq 'uuid') { + my $abs = $value; + + if ($abs =~ m/^[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}$/) { + $abs = lc "urn:uuid:$abs"; + } + + $pagestate{$page}{meta}{uuid}=HTML::Entities::encode_numeric($abs); + # fallthrough + } elsif ($key eq 'license') { push @{$metaheaders{$page}}, '<link rel="license" href="#page_license" />'; $pagestate{$page}{meta}{license}=$value; |