Skip to content

Commit

Permalink
Update features facade to use enum values
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Apr 9, 2024
1 parent d9479bf commit c17a7df
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/framework/src/Facades/Features.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Hyde\Facades;

use Hyde\Hyde;
use Hyde\Enums\Feature;
use Hyde\Pages\MarkdownPost;
use Hyde\Pages\DocumentationPage;
use Hyde\Support\Concerns\Serializable;
Expand Down Expand Up @@ -104,42 +105,42 @@ public static function hasTorchlight(): bool

public static function htmlPages(): string
{
return 'html-pages';
return Feature::HtmlPages->value;
}

public static function bladePages(): string
{
return 'blade-pages';
return Feature::BladePages->value;
}

public static function markdownPages(): string
{
return 'markdown-pages';
return Feature::MarkdownPages->value;
}

public static function markdownPosts(): string
{
return 'markdown-posts';
return Feature::MarkdownPosts->value;
}

public static function documentationPages(): string
{
return 'documentation-pages';
return Feature::DocumentationPages->value;
}

public static function documentationSearch(): string
{
return 'documentation-search';
return Feature::DocumentationSearch->value;
}

public static function darkmode(): string
{
return 'darkmode';
return Feature::Darkmode->value;
}

public static function torchlight(): string
{
return 'torchlight';
return Feature::Torchlight->value;
}

// ====================================================
Expand Down

0 comments on commit c17a7df

Please sign in to comment.