Skip to content

Commit

Permalink
Override file finder to reject readme files
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jun 8, 2024
1 parent 2081ee9 commit 8ba3317
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Extend/DataCollections.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace App\Extend;

use Hyde\Facades\Filesystem;
use Illuminate\Support\Collection;
use Hyde\Markdown\Models\FrontMatter;
use Illuminate\Support\Str;
use Hyde\Markdown\Models\MarkdownDocument;
Expand Down Expand Up @@ -81,4 +82,9 @@ class_alias($newClassName, $className);

return $className;
}

protected static function findFiles(string $name, array|string $extensions): Collection
{
return parent::findFiles($name, $extensions)->reject(fn (string $file) => basename($file) === 'README.md');
}
}

0 comments on commit 8ba3317

Please sign in to comment.