_includes/head.html in jekyll-theme-pirati-7.6.2 vs _includes/head.html in jekyll-theme-pirati-7.7.0
- old
+ new
@@ -41,14 +41,22 @@
<meta property="og:url" content="{{ page.url | absolute_url }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:description" content="{{ description }}" />
{% if page.layout == 'post' %}
- {% capture img_path %}{% asset '{{ page.image }}' @path %}{% endcapture %}
- <meta property="og:image" content="{{ img_path | absolute_url }}" />
+ {% if site.mediaStorage %}
+ {% capture imgPath %}https://a.pirati.cz/{{ site.mediaStorage }}/img/{{ include.image }}{% endcapture %}
+ {% else %}
+ {% capture img_path %}{% asset '{{ page.image }}' @path %}{% endcapture %}
+ {% endif %}
+ <meta property="og:image" content="{{ img_path | absolute_url }}" />
{% elsif page.img %}
- {% capture img_path %}{% asset '{{ page.img }}' @path %}{% endcapture %}
- <meta property="og:image" content="{{ img_path | absolute_url }}" />
+ {% if site.mediaStorage %}
+ {% capture imgPath %}https://a.pirati.cz/{{ site.mediaStorage }}/img/{{ include.img }}{% endcapture %}
+ {% else %}
+ {% capture img_path %}{% asset '{{ page.img }}' @path %}{% endcapture %}
+ {% endif %}
+ <meta property="og:image" content="{{ img_path | absolute_url }}" />
{% else %}
<meta property="og:image" content="{{ 'assets/img/brand/logo-round.png' | absolute_url }}" />
{% endif %}
<!-- Fonts -->
{% if page.layout != 'blank' %}