|
@@ -798,7 +798,21 @@ sub sitemap ($query, $render_cb) {
|
|
|
changefreq => $changefreq,
|
|
changefreq => $changefreq,
|
|
|
priority => 1.0,
|
|
priority => 1.0,
|
|
|
);
|
|
);
|
|
|
- #TODO add video & preview image if applicable
|
|
|
|
|
|
|
+
|
|
|
|
|
+ #add video & preview image if applicable
|
|
|
|
|
+ $data{images} = [{
|
|
|
|
|
+ loc => "http://$query->{domain}$url->{href}",
|
|
|
|
|
+ caption => $url->{data},
|
|
|
|
|
+ title => $url->{title},
|
|
|
|
|
+ }] if $url->{is_image};
|
|
|
|
|
+
|
|
|
|
|
+ $data{videos} = [{
|
|
|
|
|
+ content_loc => "http://$query->{domain}$url->{href}",
|
|
|
|
|
+ thumbnail_loc => "http://$query->{domain}$url->{preview}",
|
|
|
|
|
+ title => $url->{title},
|
|
|
|
|
+ description => $url->{data},
|
|
|
|
|
+ }] if $url->{is_video};
|
|
|
|
|
+
|
|
|
$sm->add(%data);
|
|
$sm->add(%data);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|