diff options
Diffstat (limited to '')
-rw-r--r-- | lib/ballet.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/ballet.pm b/lib/ballet.pm index 400e372..10e3a1f 100644 --- a/lib/ballet.pm +++ b/lib/ballet.pm @@ -1,10 +1,22 @@ package ballet; + +use 5.010; + use Dancer ':syntax'; +use ballet::Git; our $VERSION = '0.1'; +my $git = ballet::Git->new( wiki_path => setting('wiki_path') ); + get '/' => sub { - template 'index'; + wiki_page('Home'); }; +sub wiki_page { + my $page_name = shift; + my $content = $git->find_page($page_name, 'master'); + return $content; +} + true; |