Skip to content

Commit 2722b4b

Browse files
committed
Twitter meta.
1 parent c1fc63d commit 2722b4b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

themes/usips/templates/blog-post.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
{% if page.extra.blog_image %}
1010
<meta property="og:image" content="{{ get_url(path=page.extra.blog_image) }}">
1111
{% endif %}
12+
<meta name="twitter:card" content="summary">
13+
<meta name="twitter:site" content="@usipsorg">
14+
{% if page.extra.blog_image %}
15+
<meta name="twitter:image" content="{{ get_url(path=page.extra.blog_image) }}">
16+
{% endif %}
17+
{% if page.extra.author %}
18+
{% set author = config.extra.authors[page.extra.author] %}
19+
{% if author.social %}
20+
{% set creator_handle = author.social | split(pat="/") | last %}
21+
<meta name="twitter:creator" content="@{{ creator_handle }}">
22+
{% endif %}
23+
{% endif %}
1224
{% endblock %}
1325

1426

0 commit comments

Comments
 (0)