File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 < meta property ="og:description " content ="{% if page.meta and page.meta.description %}{{ page.meta.description }}{% else %}{{ config.site_description }}{% endif %} " />
2222 < meta property ="og:site_name " content ="{{ config.site_name }} " />
2323 {% if page.meta and page.meta.image %}
24- < meta property ="og:image " content ="{{ config.site_url }}{{ page.meta.image }} " />
24+ {% set image_path = page.meta.image if page.meta.image.startswith('http') else (config.site_url ~ page.meta.image.lstrip('/')) %}
25+ < meta property ="og:image " content ="{{ image_path }} " />
26+ < meta property ="og:image:secure_url " content ="{{ image_path }} " />
27+ < meta property ="og:image:width " content ="1200 " />
28+ < meta property ="og:image:height " content ="630 " />
29+ < meta property ="og:image:alt " content ="{{ page.title }} " />
2530 {% else %}
2631 < meta property ="og:image " content ="{{ config.site_url }}assets/images/avatar.png " />
32+ < meta property ="og:image:width " content ="512 " />
33+ < meta property ="og:image:height " content ="512 " />
2734 {% endif %}
2835
2936 <!-- Twitter -->
3239 < meta name ="twitter:title " content ="{% if page.title %}{{ page.title }} - {{ config.site_name }}{% else %}{{ config.site_name }}{% endif %} " />
3340 < meta name ="twitter:description " content ="{% if page.meta and page.meta.description %}{{ page.meta.description }}{% else %}{{ config.site_description }}{% endif %} " />
3441 {% if page.meta and page.meta.image %}
35- < meta name ="twitter:image " content ="{{ config.site_url }}{{ page.meta.image }} " />
42+ {% set image_path = page.meta.image if page.meta.image.startswith('http') else (config.site_url ~ page.meta.image.lstrip('/')) %}
43+ < meta name ="twitter:image " content ="{{ image_path }} " />
44+ < meta name ="twitter:image:alt " content ="{{ page.title }} " />
3645 {% else %}
3746 < meta name ="twitter:image " content ="{{ config.site_url }}assets/images/avatar.png " />
3847 {% endif %}
You can’t perform that action at this time.
0 commit comments