mirror of
https://github.com/archtechx/laravel-seo.git
synced 2025-12-12 01:44:03 +00:00
Add support 'keywords' meta tag
This commit is contained in:
parent
3a17c8ee11
commit
100660e210
6 changed files with 11 additions and 6 deletions
|
|
@ -20,7 +20,7 @@ class GenerateFaviconsCommand extends Command
|
|||
if (! is_string($path)) {
|
||||
$this->error('The `from` argument must be a string.');
|
||||
|
||||
return Command::FAILURE;
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
$this->info('Generating favicons...');
|
||||
|
|
@ -28,13 +28,13 @@ class GenerateFaviconsCommand extends Command
|
|||
if (! class_exists(ImageManager::class)) {
|
||||
$this->error('Intervention not available, please run `composer require intervention/image`');
|
||||
|
||||
return Command::FAILURE;
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
if (! file_exists($path)) {
|
||||
$this->error("Given icon path `{$path}` does not exist.");
|
||||
|
||||
return Command::FAILURE;
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
// GD driver doesn't support .ico, that's why we use ImageMagick.
|
||||
|
|
@ -56,6 +56,6 @@ class GenerateFaviconsCommand extends Command
|
|||
|
||||
$this->info('All favicons have been generated!');
|
||||
|
||||
return Command::SUCCESS;
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,12 +11,13 @@ use Illuminate\Support\Str;
|
|||
/**
|
||||
* @method $this title(string $title = null, ...$args) Set the title.
|
||||
* @method $this description(string $description = null, ...$args) Set the description.
|
||||
* @method $this keywords(string $keywords = null, ...$args) Set the keywords.
|
||||
* @method $this url(string $url = null, ...$args) Set the canonical URL.
|
||||
* @method $this site(string $site = null, ...$args) Set the site name.
|
||||
* @method $this image(string $url = null, ...$args) Set the cover image.
|
||||
* @method $this type(string $type = null, ...$args) Set the page type.
|
||||
* @method $this locale(string $locale = null, ...$args) Set the page locale.
|
||||
* @method $this twitter(enabled $bool = true, ...$args) Enable the Twitter extension.
|
||||
* @method $this twitter(bool $enabled = true, ...$args) Enable the Twitter extension.
|
||||
* @method $this twitterCreator(string $username = null, ...$args) Set the Twitter author.
|
||||
* @method $this twitterSite(string $username = null, ...$args) Set the Twitter author.
|
||||
* @method $this twitterTitle(string $title = null, ...$args) Set the Twitter title.
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class SEOServiceProvider extends ServiceProvider
|
|||
|
||||
public function boot(): void
|
||||
{
|
||||
$this->loadViewsFrom(__DIR__ . '/../assets/views', 'seo');
|
||||
$this->loadViewsFrom(__DIR__ . '/../views', 'seo');
|
||||
|
||||
if ($this->app->runningInConsole()) {
|
||||
$this->commands([
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
<meta name="description" content="@seo('description')" />
|
||||
@endif
|
||||
|
||||
@if(seo('keywords'))
|
||||
<meta name="keywords" content="@seo('keywords')">
|
||||
@endif
|
||||
|
||||
@if(seo('type'))
|
||||
<meta property="og:type" content="@seo('type')" />
|
||||
@else
|
||||
Loading…
Add table
Add a link
Reference in a new issue