Skip to content

Commit

Permalink
Check that blogging is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 12, 2024
1 parent 3fc5a69 commit 00bddaa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Hyde\Framework\Features\Blogging;

use Hyde\Hyde;
use Hyde\Enums\Feature;
use Hyde\Pages\MarkdownPost;
use Hyde\Framework\Features\Blogging\Models\PostAuthor;
use Hyde\Framework\Features\Blogging\DynamicPages\PostAuthorPage;
Expand All @@ -20,7 +21,7 @@ public static function canGenerateAuthorPages(): bool
{
// Todo: Also check that this feature is enabled

return Hyde::authors()->isNotEmpty() && MarkdownPost::all()->isNotEmpty();
return Hyde::hasFeature(Feature::MarkdownPosts) && Hyde::authors()->isNotEmpty() && MarkdownPost::all()->isNotEmpty();
}

/** @return array<\Hyde\Framework\Features\Blogging\DynamicPages\PostAuthorPage> */
Expand Down

0 comments on commit 00bddaa

Please sign in to comment.