diff options
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index da39631..17142ed 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -96,6 +96,13 @@ has 'globally_writable' => , init_arg => undef ); +has 'cgit_url' => + ( is => 'ro' + , isa => 'Str' + , lazy_build => 1 + , init_arg => undef + ); + has 'ikiwiki_setup' => ( is => 'ro' , isa => 'Str' @@ -515,6 +522,12 @@ sub _build_globally_writable { return ( $s->repostat->[2] & 0111 ) == 0111; }; +sub _build_cgit_url { + my ( $s ) = @_; + + return $s->config->piny_ikiwikisecureurl . "cgit/" . $s->name; +} + sub _build_ikiwiki_setup { my ( $s ) = @_; |