laravel-Meta icon indicating copy to clipboard operation
laravel-Meta copied to clipboard

Preventing unwanted duplicate tags

Open bellwood opened this issue 5 years ago • 1 comments

When trying to add twitter cards:

{!! Meta::tag('card') !!}

I am seeing the following rendered:

<meta name="card" content="Summary" />
<meta name="twitter:card" content="Summary" />

...when all I want is:

<meta name="twitter:card" content="Summary" />

I see some granularity was added in 2.0 but I don't see a way to call Meta::tagTwitterCard or similar.

Thank you.

bellwood avatar May 14 '19 15:05 bellwood

@bellwood just add

  1. Meta::set('twitter:card', 'summary'); to your controller
  2. {!! Meta::tag('twitter:card') !!} to your blade template to display it

edit OR just add {!! Meta::tag('twitter:card', 'summary') !!} to your main blade to set the default

chuckreynolds avatar Oct 20 '19 22:10 chuckreynolds