mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
Added preview of the file "readme" like in github with using showdown.js parser (http://github.com/coreyti/showdown).
This commit is contained in:
@@ -16,6 +16,7 @@ $app->get('{repo}/', function($repo) use($app) {
|
||||
'breadcrumbs' => $breadcrumbs,
|
||||
'branches' => $repository->getBranches(),
|
||||
'tags' => $repository->getTags(),
|
||||
'readme' => $app['utils']->getReadme($repo),
|
||||
));
|
||||
})->assert('repo', '[\w-._]+');
|
||||
|
||||
@@ -35,6 +36,7 @@ $app->get('{repo}/tree/{branch}/', function($repo, $branch) use($app) {
|
||||
'breadcrumbs' => $breadcrumbs,
|
||||
'branches' => $repository->getBranches(),
|
||||
'tags' => $repository->getTags(),
|
||||
'readme' => $app['utils']->getReadme($repo, $branch),
|
||||
));
|
||||
})->assert('repo', '[\w-._]+')
|
||||
->assert('branch', '[\w-._]+');
|
||||
|
||||
Reference in New Issue
Block a user