Add a blurb to the index page, indicating what the application is & does, and how to report issues

This commit is contained in:
Lewis Dale 2024-12-31 13:40:51 +00:00
parent 918e435c59
commit 49ac6f34bc
3 changed files with 11 additions and 8 deletions

View File

@ -8,7 +8,7 @@ use Psr\Http\Message\ServerRequestInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Slim\Views\Twig; use Slim\Views\Twig;
class SampleController class HomeController
{ {
public function __construct( public function __construct(
private readonly Twig $view, private readonly Twig $view,
@ -17,7 +17,7 @@ class SampleController
public function get(ServerRequestInterface $request, ResponseInterface $response) public function get(ServerRequestInterface $request, ResponseInterface $response)
{ {
$this->logger->info("SampleController::get() called"); $this->logger->info("HomeController::get() called");
return $this->view->render($response, 'index.twig.html'); return $this->view->render($response, 'index.twig.html');
} }
} }

View File

@ -1,10 +1,10 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
use Lewisdale\App\Controllers\FeedController; use Lewisdale\App\Controllers\FeedController;
use Lewisdale\App\Controllers\SampleController; use Lewisdale\App\Controllers\HomeController;
use Slim\Views\TwigMiddleware; use Slim\Views\TwigMiddleware;
ini_set('user_agent', 'Baleen/1.0 (https://lewisdale.dev)'); ini_set('user_agent', 'Baleen/1.0 (https://baleen.lewisdale.dev)');
require_once __DIR__ . "/dependencies.php"; require_once __DIR__ . "/dependencies.php";
@ -19,7 +19,7 @@ require_once __DIR__ . "/session.php";
$app->add(TwigMiddleware::createFromContainer($app)); $app->add(TwigMiddleware::createFromContainer($app));
$app->add('csrf'); $app->add('csrf');
$app->get("/", [SampleController::class, 'get']); $app->get("/", [HomeController::class, 'get']);
$app->get('/feed', [FeedController::class, 'get']); $app->get('/feed', [FeedController::class, 'get']);

View File

@ -1,4 +1,7 @@
<h1>Hello, world.</h1> <h1>Baleen</h1>
<p>This is a boilerplate PHP app. You should start by adding some routes, controllers, and maybe making me look <p>This is Baleen, an RSS and Podcast feed filtering application. If you're here because you've spotted the user agent in your logs, it's because someone is using this application to produce a filtered RSS feed.</p>
good.</p>
<p>Baleen will always use the user agent <code>Baleen/1.0 (https://baleen.lewisdale.dev)</code>, and should respect robots.txt.</p>
<p>If you're blocking Baleen, but we're still appearing in your logs, please get in touch with <a href="https://lewisdale.dev/links/">the developer</a>, as this is likely a bug in the software.</p>