# Metadata collection that needs to happen during the scan pass.
if ($key eq 'title') {
$pagestate{$page}{meta}{title}=HTML::Entities::encode_numeric($value);
- # fallthrough
+ return "";
}
elsif ($key eq 'description') {
$pagestate{$page}{meta}{description}=HTML::Entities::encode_numeric($value);
push @{$metaheaders{$page}}, '<meta name="robots"'.
' content="'.encode_entities($value).'" />';
}
+ elsif ($key eq 'description') {
+ push @{$metaheaders{$page}}, '<meta name="'.encode_entities($key).
+ '" content="'.encode_entities($value).'" />';
+ }
else {
push @{$metaheaders{$page}}, scrub('<meta name="'.encode_entities($key).
'" content="'.encode_entities($value).'" />', $destpage);
$template->param(title_overridden => 1);
}
- foreach my $field (qw{author authorurl permalink}) {
+ foreach my $field (qw{author authorurl description permalink}) {
$template->param($field => $pagestate{$page}{meta}{$field})
if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field);
}
+ikiwiki (3.20091114) UNRELEASED; urgency=low
+
+ * meta: Generate meta description tags even when the html scrubber is
+ enabled.
+ * meta: Allow use of DESCRIPTION in templates to get at the meta description
+ value. (Thanks, NicolasLimare)
+
+ -- Joey Hess <joeyh@debian.org> Mon, 16 Nov 2009 15:46:45 -0500
+
ikiwiki (3.20091113) unstable; urgency=low
* underlay: Fix example values put in setup file to be array
\[[!map pages="* and !blog/* and !*/Discussion" show=title]]
+ \[[!map pages="* and !blog/* and !*/Discussion" show=description]]
+
Hint: To limit the map to displaying pages less than a certain level deep,
use a [[ikiwiki/PageSpec]] like this: `pages="* and !*/*/*"`
* description
- Specifies a "description" of the page. You could use this to provide
- a summary, for example, to be picked up by the [[map]] directive.
+ Specifies a short description for the page. This will be put in
+ the html header, and can also be displayed by eg, the [[map]] directive.
* permalink