|
1 | 1 | <!-- Custom code starts here (Metadata) / Code personalisé commence ici (Métadonnées) -->
|
2 |
| - <link rel="canonical" href="{{ page.url | remove_first: '/' | remove_first: page.lang | prepend: site.altLangUrl[ page.lang ] }}" /> |
3 |
| - <link rel="alternate" href="{{ page.altLangPage | prepend: site.altLangUrl[ i18nText-altLang ] }}" hreflang="{{ i18nText-altLang }}" /> |
| 2 | + <link rel="canonical" href="{{ page.url | absolute_url }}" /> |
| 3 | + <link rel="alternate" href="{{ page.altLangPage }}" hreflang="{{ i18nText-altLang }}" /> |
4 | 4 | {%- if page.description %}
|
5 | 5 | <meta name="description" content="{{ page.description }}" />
|
| 6 | + {%- if page.image %} |
| 7 | + <meta name="og:description" content="{{ page.description }}" /> |
| 8 | + <meta name="twitter:description" content="{{ page.description }}" /> |
| 9 | + {% endif %} |
6 | 10 | {%- elsif site.description %}
|
7 | 11 | <meta name="description" content="{{ site.description[ page.lang ] }}" />
|
8 | 12 | {%- endif %}
|
|
33 | 37 | <meta name="dcterms.service" content="{{ site.analytics.providers.adobe.service }}">
|
34 | 38 | {%- endif %}
|
35 | 39 | <meta name="generator" content="Jekyll v{{ jekyll.version }}" />
|
36 |
| -{%- if page.layout == "post" %} |
| 40 | +{%- if page.layout == "post" or page.image %} |
37 | 41 | {%- if page.title %}
|
38 | 42 | <meta property="og:title" content="{{ page.title }}" />
|
39 | 43 | <meta property="twitter:title" content="{{ page.title }}" />
|
40 | 44 | {%- endif %}
|
41 | 45 | <meta property="og:locale" content="{{ page.lang | append: '_CA' }}" />
|
42 |
| - <meta property="og:url" content="{{ site.urlalt[ page.lang ] }}{{ page.url | remove_first: '/' | remove_first: page.lang }}" /> |
| 46 | + <meta property="og:url" content="{{ page.url | absolute_url }}" /> |
43 | 47 | {%- if page.image %}
|
44 |
| - {%- capture ogimage -%}{{ page.lang | prepend: '/' }}/images/{{ page.date | date: "%F" | prepend: "og-" }}.png{%- endcapture -%} |
| 48 | + {%- capture ogimage -%}/images/thumbs/{{ page.image.filename }}{%- endcapture -%} |
45 | 49 | {%- assign file_exists = site.static_files | where: "path", ogimage -%}
|
46 | 50 |
|
47 | 51 | {%- if file_exists[0].path %}
|
48 |
| - <meta property="og:image" content="{{ site.urlalt[ page.lang ] }}{{ ogimage | remove_first: '/' | remove_first: page.lang }}" /> |
49 |
| - <meta property="twitter:image" content="{{ site.urlalt[ page.lang ] }}{{ ogimage | remove_first: '/' | remove_first: page.lang }}" /> |
| 52 | + <meta property="og:image" content="{{ ogimage | absolute_url }}" /> |
| 53 | + <meta property="twitter:image" content="{{ ogimage | absolute_url }}" /> |
50 | 54 | {%- else %}
|
51 |
| - <meta property="og:image" content="{{ site.urlalt[ page.lang ] }}/images/thumbs/{{ page.date | date: '%F' }}.png" /> |
52 |
| - <meta property="twitter:image" content="{{ site.urlalt[ page.lang ] }}/images/thumbs/{{ page.date | date: '%F' }}.png" /> |
| 55 | + <meta property="og:image" content="{{ site.url }}/images/thumbs/{{ page.date | date: '%F' }}.png" /> |
| 56 | + <meta property="twitter:image" content="{{ site.url }}/images/thumbs/{{ page.date | date: '%F' }}.png" /> |
53 | 57 | {%- endif %}
|
54 | 58 |
|
55 | 59 | {%- if page.image.height %}
|
|
80 | 84 | {%- endif %}
|
81 | 85 |
|
82 | 86 | {%- if site.title %}
|
83 |
| - <meta property="og:site_name" content="{{ site.title[ page.lang ] }}" /> |
| 87 | + <meta property="og:site_name" content="{{ site.title }}" /> |
84 | 88 | {%- endif -%}
|
85 | 89 |
|
86 | 90 | {%- if paginator.previous_page %}
|
|
0 commit comments