Add link to README.md on main page and create route for it

This commit is contained in:
Vladimir Mirivlad 2026-02-06 08:06:12 +00:00
parent 4b355c4b1b
commit b2ade0cfcb
2 changed files with 7 additions and 0 deletions

View File

@ -71,6 +71,12 @@ $app->get('/SKILL.md', function (Request $request, Response $response) {
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);

View File

@ -183,6 +183,7 @@
<h2>Navigation</h2>
<ul>
<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>
</div>