Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bangnokia committed Mar 23, 2024
1 parent 8321ded commit 15cba71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Commands/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function handle(): int
// file_get_contents('https://ping2.me/@daudau/debug?message=building');
$finder = app(ContentFinder::class);

$items = $finder->index('./');
$items = $finder->index();
$renderer = app(MarkdownRenderer::class);

$this->warn('Building your site...');
Expand Down
4 changes: 2 additions & 2 deletions app/ContentFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ public function get(string $filePath, $absolute = false): Content
);
}

public function index(string $directory): array
public function index(string $directory = ''): array
{
$posts = [];
$finder = (new Finder())->in($this->workingDir . ltrim('/' . $directory));
$finder = (new Finder())->in($this->workingDir . ltrim('/' . $directory))->name('*.md');

foreach ($finder as $file) {
if ($file->isDir()) {
Expand Down

0 comments on commit 15cba71

Please sign in to comment.