Skip to content

Commit

Permalink
Meta Name ( Important fix )
Browse files Browse the repository at this point in the history
  • Loading branch information
karakhanyans committed Jan 30, 2021
1 parent 754c0e3 commit 5228965
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/SeoManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public function registerHelpers()
*/
public function registerBladeDirectives()
{

Blade::directive('meta', function ($expression) {
$meta = '';
$expression = trim($expression, '\"\'');
Expand All @@ -85,24 +84,24 @@ public function registerBladeDirectives()
$meta .= "<meta property='{$key}' content='{$og}'/>";
}
} else {
$meta .= "<meta property='{$expression}' content='{$metaData}'/>";
$meta .= "<meta name='{$expression}' content='{$metaData}'/>";
}
return $meta;
});
Blade::directive('keywords', function () {
return "<meta property='keywords' content='" . metaKeywords() . "'/>";
return "<meta name='keywords' content='" . metaKeywords() . "'/>";
});
Blade::directive('url', function () {
return "<meta property='url' content='" . metaUrl() . "'/>";
return "<meta name='url' content='" . metaUrl() . "'/>";
});
Blade::directive('author', function () {
return "<meta property='author' content='" . metaAuthor() . "'/>";
return "<meta name='author' content='" . metaAuthor() . "'/>";
});
Blade::directive('description', function () {
return "<meta property='description' content='" . metaDescription() . "'/>";
return "<meta name='description' content='" . metaDescription() . "'/>";
});
Blade::directive('title', function () {
return "<meta property='title' content='" . metaTitle() . "'/>";
return "<meta name='title' content='" . metaTitle() . "'/>";
});
Blade::directive('openGraph', function ($expression) {
$expression = trim($expression, '\"\'');
Expand All @@ -113,7 +112,7 @@ public function registerBladeDirectives()
$meta .= "<meta property='{$key}' content='{$og}'/>";
}
} else {
$meta .= "<meta property='{$expression}' content='{$metaOpenGraph}'/>";
$meta .= "<meta name='{$expression}' content='{$metaOpenGraph}'/>";
}
return $meta;
});
Expand Down

0 comments on commit 5228965

Please sign in to comment.