Add link to README.md on main page and create route for it
This commit is contained in:
parent
4b355c4b1b
commit
b2ade0cfcb
|
|
@ -71,6 +71,12 @@ $app->get('/SKILL.md', function (Request $request, Response $response) {
|
||||||
return $response->withHeader('Content-Type', 'text/plain');
|
return $response->withHeader('Content-Type', 'text/plain');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Маршрут для README
|
||||||
|
$app->get('/README.md', function (Request $request, Response $response) {
|
||||||
|
$response->getBody()->write(file_get_contents(__DIR__ . '/../README.md'));
|
||||||
|
return $response->withHeader('Content-Type', 'text/plain');
|
||||||
|
});
|
||||||
|
|
||||||
// Обработка ошибок
|
// Обработка ошибок
|
||||||
$errorMiddleware = $app->addErrorMiddleware($_ENV['APP_DEBUG'] ?? false, true, true);
|
$errorMiddleware = $app->addErrorMiddleware($_ENV['APP_DEBUG'] ?? false, true, true);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -183,6 +183,7 @@
|
||||||
<h2>Navigation</h2>
|
<h2>Navigation</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/feeds">Browse all RSS feeds</a> - View all registered feeds with filtering and pagination</li>
|
<li><a href="/feeds">Browse all RSS feeds</a> - View all registered feeds with filtering and pagination</li>
|
||||||
|
<li><a href="/README.md">Installation guide</a> - How to install and setup your own RSS Hub instance</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue