Skip to content

Commit

Permalink
Add description meta shorthand tag
Browse files Browse the repository at this point in the history
  • Loading branch information
romanzipp committed Nov 28, 2018
1 parent 537be5f commit 9f33301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

'description' => [

// <meta name="description" content="..." />
'meta' => true,

// <meta property="og:description" content="..." />
'opengraph' => true,

Expand Down
2 changes: 2 additions & 0 deletions src/Services/Traits/ShorthandSetterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public function description(string $description = null): self
{
$config = array_get($this->config, 'shorthand.description');

$this->addIf($config['meta'], Description::make()->content($description));

$this->addIf($config['opengraph'], OpenGraph::make()->property('description')->content($description));

$this->addIf($config['twitter'], Twitter::make()->name('description')->content($description));
Expand Down

0 comments on commit 9f33301

Please sign in to comment.