From 4f68b8a4bbb68e47b1d40c54cac8cd23726a534c Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 29 Jan 2014 02:27:20 +0100 Subject: [PATCH] added README to main framework docs --- extensions/apidoc/templates/bootstrap/Renderer.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extensions/apidoc/templates/bootstrap/Renderer.php b/extensions/apidoc/templates/bootstrap/Renderer.php index ef8d37b45a..73dcb27082 100644 --- a/extensions/apidoc/templates/bootstrap/Renderer.php +++ b/extensions/apidoc/templates/bootstrap/Renderer.php @@ -70,6 +70,13 @@ class Renderer extends \yii\apidoc\templates\html\Renderer ]); file_put_contents($dir . "/ext_{$ext}_index.html", $indexFileContent); } + $readme = @file_get_contents("https://raw.github.com/yiisoft/yii2-framework/master/README.md"); + $indexFileContent = $this->renderWithLayout($this->indexView, [ + 'docContext' => $context, + 'types' => $this->filterTypes($types, 'yii'), + 'readme' => $readme ?: null, + ]); + file_put_contents($dir . '/index.html', $indexFileContent); $controller->stdout('done.' . PHP_EOL, Console::FG_GREEN); }