Skip to content

Commit 4e97888

Browse files
committed
add metadata tag og:image. Should include blog image when sharing on social media
1 parent cdbaba6 commit 4e97888

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

_layouts/single.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
2323
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
2424
{% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date_to_xmlschema }}">{% endif %}
25+
{% if page.featured-image %}<meta property="og:image" content="{{ page.featured-image | absolute_url }}">{% endif %}
26+
27+
2528

2629
<div class="page__inner-wrap">
2730
{% unless page.header.overlay_color or page.header.overlay_image %}

_posts/2024-07-24-adam-li-interview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ categories:
55
- Team
66
tags:
77
- Open Source
8-
featured-image: adam-li-interview.png
8+
featured-image: /assets/images/posts_images/adam-li-interview.png
99

1010
postauthors:
1111
- name: Reshama Shaikh
@@ -17,7 +17,7 @@ postauthors:
1717
---
1818

1919
<div>
20-
<img src="/assets/images/posts_images/{{ page.featured-image }}" alt="">
20+
<img src="{{ page.featured-image }}" alt="">
2121
{% include postauthor.html %}
2222
</div>
2323

0 commit comments

Comments
 (0)