add-route.php

<?php
// in production, you might use a database & have some error handling
$articles = [
    'cat'=>[
        'title'=>'Cats are great',
        'description'=>'I\'ve always loved cats. I had two when I was a little kid. As a teen I had a dog & a cat. Loved them both dearly. I love dogs too.'
    ],
    'dog'=>[
        'title'=>'fill me in',
        'description'=>'fill me in'
    ],
];

$lia->addRoute('/{article}/',
    function($route, $response) use ($lia, $articles){
        $slug = $route->param('article');
        $view = $lia->view('ArticlePreview', $articles[$slug]);
        $response->content = $view;
    }
);