I currently have the same problem. I modified the starterkit to only show articles (in subfolders) that are inside the “home” folder. I added a model/home.php with the code above, but the url stays the same -> site.com/subfolder-from-site/home/slug-of-the-article.
model/home.php
<?php
class HomePage extends Page {
public function url($options = null): string {
return $this->slug();
}
}
The overwritten url() method only affects pages with the home template. If you want to overwrite the article urls, you need a model/article.php (depending on the name of your article template).