rename uuid to guid
parent
c522fffe09
commit
ca30d95a78
|
@ -443,8 +443,8 @@ sub genfeed ($$$$@) { #{{{
|
|||
);
|
||||
|
||||
if (exists $pagestate{$p} &&
|
||||
exists $pagestate{$p}{meta}{uuid}) {
|
||||
$itemtemplate->param(uuid => $pagestate{$p}{meta}{uuid});
|
||||
exists $pagestate{$p}{meta}{guid}) {
|
||||
$itemtemplate->param(guid => $pagestate{$p}{meta}{guid});
|
||||
}
|
||||
|
||||
if ($itemtemplate->query(name => "enclosure")) {
|
||||
|
|
|
@ -84,14 +84,14 @@ sub preprocess (@) { #{{{
|
|||
$pagestate{$page}{meta}{description}=HTML::Entities::encode_numeric($value);
|
||||
# fallthrough
|
||||
}
|
||||
elsif ($key eq 'uuid') {
|
||||
elsif ($key eq 'guid') {
|
||||
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);
|
||||
$pagestate{$page}{meta}{guid}=HTML::Entities::encode_numeric($abs);
|
||||
# fallthrough
|
||||
}
|
||||
elsif ($key eq 'license') {
|
||||
|
|
|
@ -15,8 +15,8 @@ ikiwiki (2.54) UNRELEASED; urgency=low
|
|||
* Change deb dependencies to list Text::Markdown before markdown, since
|
||||
the former, while slower, has a much better html parser that avoids
|
||||
numerous bugs.
|
||||
* meta: Support a uuid option, to allow forcing a particular uuid
|
||||
in feeds.
|
||||
* meta: Support a guid option, to allow forcing a particular url or
|
||||
uuid in feeds.
|
||||
|
||||
-- Josh Triplett <josh@freedesktop.org> Wed, 09 Jul 2008 21:30:33 -0700
|
||||
|
||||
|
|
|
@ -123,16 +123,16 @@ Supported fields:
|
|||
contents. In particular, it does not check the values against the set of
|
||||
valid values but serves whatever you pass it.
|
||||
|
||||
* uuid
|
||||
* guid
|
||||
|
||||
Specifies a globally unique ID for a page. This ID will be used,
|
||||
rather than the page url, in RSS and Atom feeds.
|
||||
Specifies a globally unique ID for a page. This guid will be used,
|
||||
rather than the page url, to identify the page in RSS and Atom feeds.
|
||||
|
||||
The uuid can either be a literal uuid (ie,
|
||||
"ec248d04-f347-4eb8-92b6-671b15d36980"), or it can be an alternative URl
|
||||
The guid can either be a uuid (ie,
|
||||
"ec248d04-f347-4eb8-92b6-671b15d36980"), or it can be an alternative URL
|
||||
for the page.
|
||||
|
||||
This is mostly useful when a page's feed has moved, to keep the IDs for
|
||||
This is mostly useful when a page's feed has moved, to keep the guids for
|
||||
pages unchanged and
|
||||
[[avoid_flooding_aggregators|howto_avoid_flooding_aggregators]].
|
||||
|
||||
|
|
|
@ -24,5 +24,5 @@ Where "old_post" is the name of the last post you made to the blog before
|
|||
making the change. This will limit the feed to only newer posts, while stil
|
||||
displaying the old posts in the blog page.
|
||||
|
||||
Alternatively, you can add the [[plugins/meta]] uuid directives to pages,
|
||||
Alternatively, you can add the [[plugins/meta]] guid directives to pages,
|
||||
to force the old url to be used.
|
||||
|
|
|
@ -16,5 +16,9 @@ Perhaps ikiwiki's blogging functionality could be hooked up to the [meta plugin]
|
|||
|
||||
> [[merged|done]], thank you!
|
||||
>
|
||||
> I chose to use the term guid, since it's both a generic term that fits
|
||||
> very well and describes both using a uuid and an url, and also happens
|
||||
> to be the term rss uses. ;-)
|
||||
>
|
||||
> Of course I'm happy if you can improve the feeds. They do already
|
||||
> use some meta information (author, copyright). --[[Joey]]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<entry>
|
||||
<title><TMPL_VAR TITLE></title>
|
||||
<TMPL_IF NAME="UUID">
|
||||
<id><TMPL_VAR UUID></id>
|
||||
<TMPL_IF NAME="GUID">
|
||||
<id><TMPL_VAR GUID></id>
|
||||
<TMPL_ELSE>
|
||||
<id><TMPL_VAR URL></id>
|
||||
</TMPL_IF>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<TMPL_ELSE>
|
||||
<title><TMPL_VAR TITLE></title>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF NAME="UUID">
|
||||
<guid isPermaLink="no"><TMPL_VAR UUID></guid>
|
||||
<TMPL_IF NAME="GUID">
|
||||
<guid isPermaLink="no"><TMPL_VAR GUID></guid>
|
||||
<TMPL_ELSE>
|
||||
<guid><TMPL_VAR URL></guid>
|
||||
</TMPL_IF>
|
||||
|
|
Loading…
Reference in New Issue