Skip to content

Commit

Permalink
Generate the about page.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Jan 15, 2017
1 parent 89550e1 commit 8af589a
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions bin/generate
Expand Up @@ -22,51 +22,52 @@ my @songs = $sch->resultset('Song')->search(undef, {
order_by => 'title',
})->all;

$tt->process('index.tt', undef, 'index.html')
for (qw[index about]) {
$tt->process("$_.tt", undef, "$_.html")
or die $tt->error;
}

$tt->process('albums.tt', {
albums => \@albums,
title => 'Cooking Vinyl Compilations',
}, 'albums/index.html')
albums => \@albums,
title => 'albums',
}, 'albums/index.html')
or die $tt->error;

$tt->process('artists.tt', {
artists => \@artists,
title => 'Artists',
}, 'artists/index.html')
artists => \@artists,
title => 'Artists',
}, 'artists/index.html')
or die $tt->error;

$tt->process('songs.tt', {
tracks => \@songs,
title => 'Songs',
}, 'songs/index.html')
tracks => \@songs,
title => 'Songs',
}, 'songs/index.html')
or die $tt->error;

foreach (@albums) {
$tt->process('album.tt', {
album => $_,
tracks => [ $_->tracks ],
title => $_->page_title,
}, $_->filename)
album => $_,
tracks => [ $_->tracks ],
title => $_->page_title,
}, $_->filename)
or die $tt->error;
}

foreach (@artists) {
$tt->process('artist.tt', {
artist => $_,
tracks => [ $_->tracks ],
title => $_->page_title,
}, $_->filename)
artist => $_,
tracks => [ $_->tracks ],
title => $_->page_title,
}, $_->filename)
or die $tt->error;
}

foreach (@songs) {
$tt->process('song.tt', {
song => $_,
tracks => [ $_->tracks ],
title => $_->page_title,
}, $_->filename)
song => $_,
tracks => [ $_->tracks ],
title => $_->page_title,
}, $_->filename)
or die $tt->error;
}

0 comments on commit 8af589a

Please sign in to comment.