Skip to content

Commit

Permalink
make the description of each page contain the name of the location
Browse files Browse the repository at this point in the history
  • Loading branch information
gabor committed Jul 24, 2011
1 parent 02b2b05 commit d30d875
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions bin/xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ foreach my $g ($doc->findnodes('//group')) {
}

unless (-f "www/groups/$id.html") {
$group->{description} = "Perl Mongers $location is the Perl users group that organizes meetings";
$tt->process('src/groups/group.html', $group, "www/groups/$id.html")
|| die $tt->error();
}
Expand Down Expand Up @@ -244,6 +245,7 @@ foreach my $continent (@continents) {
latitude => $map_coordinates{$country}[1],
zoom => $map_coordinates{$country}[2],
};
$conf->{description} = "Perl Mongers in $country are the Perl users groups that organize meetings";
$tt->process('src/groups/country.html', $conf, $country_file) || die $tt->error();
}

Expand All @@ -257,6 +259,7 @@ foreach my $continent (@continents) {
zoom => $map_coordinates{$name}[2],
};

$conf->{description} = "Perl Mongers in $continent are the Perl users groups that organize meetings";
$tt->process('src/groups/continent.html', $conf, $file) || die $tt->error();
}

Expand All @@ -278,6 +281,10 @@ foreach my $continent (@continents) {
my @files = $rule->file()->name(qr/^.[^~]+$/)->in($source);

foreach my $file (@files) {
next if $file =~ /country.html$/;
next if $file =~ /group.html$/;
next if $file =~ /continent.html$/;

print STDERR $file, "\n";

my $destfile = $file;
Expand All @@ -289,6 +296,7 @@ foreach my $continent (@continents) {
if ($file =~ /\.png$/) {
copy($file, $destfile);
} else {
$parms->{description} = "Perl Mongers organise local Perl user groups and meetings";
$tt->process($file, $parms, $destfile) || die $tt->error;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/layout
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-->
<meta name="description"
content="Perl Mongers organises local Perl user groups and meetings" />
content="[% description %]" />
<meta name="keywords"
content="Perl,Perl Mongers,Mongers,User Group,Meeting" />
<meta name="MsSmartTagsPreventParsing" content="TRUE" />
Expand Down

0 comments on commit d30d875

Please sign in to comment.