From b2ade0cfcb0c26384bdd3a38cb53395407af16e7 Mon Sep 17 00:00:00 2001 From: Vladimir Mirivlad Date: Fri, 6 Feb 2026 08:06:12 +0000 Subject: [PATCH] Add link to README.md on main page and create route for it --- public/index.php | 6 ++++++ templates/index.html | 1 + 2 files changed, 7 insertions(+) diff --git a/public/index.php b/public/index.php index d88395d..4e93bc3 100644 --- a/public/index.php +++ b/public/index.php @@ -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); diff --git a/templates/index.html b/templates/index.html index 1eab520..2fcac95 100644 --- a/templates/index.html +++ b/templates/index.html @@ -183,6 +183,7 @@

Navigation