Permalink
Browse files

Start moving toward lang-specific layouts

  • Loading branch information...
1 parent ac3f9ed commit 364d3c7e29cdb9604049edcfb36d8b518bf7f9ab @sartak committed Apr 26, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 generate.pl
  2. 0 layout.html → layout.en.html
View
@@ -13,7 +13,7 @@
make_path $outdir unless -d $outdir;
-my $layout = slurp 'layout.html';
+my $en_layout = slurp 'layout.en.html';
my @months = qw/
Nulluary January February March April May June July
@@ -152,7 +152,7 @@ sub generate_article {
</div>
];
- my $html = fill_in($layout, $article);
+ my $html = fill_in($en_layout, $article);
make_path "$outdir/$article->{dir}";
open my $handle, '>', "$outdir/$article->{file}";
@@ -187,7 +187,7 @@ sub generate_index {
$posts = qq[<ul id="posts">$posts</ul>];
open my $handle, '>', "$outdir/index.html";
- print $handle fill_in($layout, {
+ print $handle fill_in($en_layout, {
content => $posts,
title => $title,
});
@@ -208,15 +208,15 @@ sub generate_drafts {
$posts = qq[<ul id="posts">$posts</ul>];
open my $handle, '>', "$outdir/drafts/index.html";
- print $handle fill_in($layout, {
+ print $handle fill_in($en_layout, {
content => $posts,
title => $title,
});
}
sub generate_about {
open my $handle, '>', "$outdir/about.html";
- print $handle fill_in($layout, {
+ print $handle fill_in($en_layout, {
content => scalar slurp('about.html'),
title => 'About Me',
});
@@ -234,15 +234,15 @@ sub generate_talks {
(my $title = $talk->{name}) =~ s/<.*?>//g;
open my $handle, '>', "$dir/index.html";
- print $handle fill_in($layout, {
+ print $handle fill_in($en_layout, {
content => $page->{content},
title => $title,
rss => '/talks/rss.xml',
});
}
open my $handle, '>', "$outdir/talks/index.html";
- print $handle fill_in($layout, {
+ print $handle fill_in($en_layout, {
content => Sartak::Blog::Talks->generate_talks_html,
title => 'Talks',
rss => '/talks/rss.xml',
File renamed without changes.

0 comments on commit 364d3c7

Please sign in to comment.