diff options
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 7 | ||||
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 10 |
2 files changed, 17 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 8890e5ed0..9a63ea1c9 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -442,6 +442,13 @@ sub genfeed ($$$$@) { #{{{ mdate_3339 => date_3339($pagemtime{$p}), ); + if (exists $pagestate{$p} && + exists $pagestate{$p}{meta}{uuid}) { + my $atom_id = $pagestate{$p}{meta}{uuid}; + + $itemtemplate->param(uuid => $atom_id); + } + if ($itemtemplate->query(name => "enclosure")) { my $file=$pagesources{$p}; my $type=pagetype($file); 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; |