Permalink
Browse files

[web/build.p6] config variables added

  • Loading branch information...
1 parent 0fe0633 commit 21c1f301b9dd104aec3120d8daca50ca41f0a1c5 @sergot committed Sep 7, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 web/build.p6
View
@@ -3,17 +3,18 @@ use JSON::Tiny;
use Template::Mojo;
my $site_dir = '/home/user/public_html/modules';
+my $fullpath = '/home/user/perl6/modules.perl6.org';
my $last_update = DateTime.now.Str;
-my $tmpl = slurp "index.mojo";
+my $tmpl = slurp "$fullpath/web/index.mojo";
-my $projects = from-json(slurp("proto.json")).values;
+my $projects = from-json(slurp("$site_dir/proto.json")).values;
my $index = open "$site_dir/index.html", :w;
$index.say: Template::Mojo.new($tmpl).render($projects.list.sort(*.<name>).item, $last_update);
$index.close;
-$tmpl = slurp "module.mojo";
+$tmpl = slurp "$fullpath/web/module.mojo";
for $projects.list -> $p {
my $m = open "$site_dir/module/{$p<name>}.html", :w;
$m.say: Template::Mojo.new($tmpl).render($p);

0 comments on commit 21c1f30

Please sign in to comment.