-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: metatags and embed templates (#1763)
- Loading branch information
1 parent
0efae89
commit cb66dae
Showing
5 changed files
with
64 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
{% extends 'partials/metatags.html.twig' %} | ||
{% block content %} | ||
{ | ||
"type": "video", | ||
"version": "1.0", | ||
"url": "{{ url(page, {canonical: true}) }}", | ||
"title": "{{ page.title }}", | ||
"description": "{{ page.description|default|e }}", | ||
{%- 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 }}, | ||
"image": "{{ url(image_asset, {canonical: true}) }}", | ||
"url": "{{ opengraph.url }}", | ||
"title": "{{ opengraph.title }}", | ||
"description": "{{ opengraph.description }}", | ||
{%- if opengraph.image is defined ~%} | ||
"thumbnail_url": "{{ url(opengraph.image, {canonical: true}) }}", | ||
"thumbnail_width": {{ opengraph.image.width }}, | ||
"thumbnail_height": {{ opengraph.image.height }}, | ||
"image": "{{ url(opengraph.image, {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 }}, | ||
{%- if opengraph.video is defined ~%} | ||
"html": "<iframe width=\"{{ opengraph.video.video.width }}\" height=\"{{ opengraph.video.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=\"{{ opengraph.title }}\"></iframe>", | ||
"width": {{ opengraph.video.video.width }}, | ||
"height": {{ opengraph.video.video.height }}, | ||
{%- endif ~%} | ||
"author_name": "{{ author.name }}", | ||
{%- if author.url is defined ~%} | ||
"author_url": "{{ author.url }}", | ||
{%- endif ~%} | ||
"author_name": "{{ site.author.name }}", | ||
"author_url": "{{ url('/', {canonical: true}) }}", | ||
"provider_name": "{{ site.title }}", | ||
"provider_url": "{{ url('/', {canonical: true}) }}", | ||
"cache_age": 3600 | ||
} | ||
} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters