Skip to content

Commit

Permalink
fix: metatags and embeded data
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Aug 17, 2023
1 parent d78f9f3 commit 0efae89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions resources/layouts/_default/page.oembed.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
{%- if page.image is defined ~%}
{%- set image_asset = asset(page.image) ~%}
"thumbnail_url": "{{ url(image_asset, {canonical: true}) }}",
"thumbnail_width": "{{ image_asset.width }}",
"thumbnail_height": "{{ image_asset.height }}",
"thumbnail_width": {{ image_asset.width }},
"thumbnail_height": {{ image_asset.height }},
"image": "{{ url(image_asset, {canonical: true}) }}",
{%- endif ~%}
{%- if page.videos is defined ~%}
{%- set video_asset = asset(page.videos[0]) ~%}
"html": "<iframe width=\"{{ video_asset.video.width }}\" height=\"{{ video_asset.video.height }}\" src=\"{{ url(page, {canonical: true, format:'iframe'}) }}\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen title=\"{{ page.title }}\"></iframe>",
"width": "{{ video_asset.video.width }}",
"height": "{{ video_asset.video.height }}",
"width": {{ video_asset.video.width }},
"height": {{ video_asset.video.height }},
{%- endif ~%}
"author_name": "{{ site.author.name }}",
"author_url": "{{ url('/', {canonical: true}) }}",
"provider_name": "{{ site.title }}",
"provider_url": "{{ url('/', {canonical: true}) }}"
"provider_url": "{{ url('/', {canonical: true}) }}",
"cache_age": 3600
}
2 changes: 1 addition & 1 deletion resources/layouts/partials/metatags.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
<meta name="twitter:card" content="player" />
<meta name="twitter:player" content="{{ url(page, {'canonical': true, 'format': 'iframe'}) }}" />
<meta name="twitter:player:width" content="{{ opengraph.video.video.width }}" />
<meta name="twitter:player:height" content="{{ opengraph.video.height }}" />
<meta name="twitter:player:height" content="{{ opengraph.video.video.height }}" />
{%- else ~%}
<meta name="twitter:card" content="summary_large_image" />
{%- endif ~%}
Expand Down

0 comments on commit 0efae89

Please sign in to comment.