Skip to content

Commit e98b971

Browse files
committed
feat: added twitter cards metadata
1 parent d82bcbb commit e98b971

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

_includes/head.pug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ head
3535
script#mcjs
3636
| !function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,"script","https://chimpstatic.com/mcjs-connected/js/users/0c8e8132be874f0e23d3a9e74/8c84f7d9d83455b08e020d552.js");
3737

38+
// Twitter cards
39+
| {% include twitter_cards.html %}

_includes/twitter_cards.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!-- Twitter cards -->
2+
<!-- From: https://brianbunke.com/blog/2017/09/06/twitter-cards-on-jekyll/#tweak-to-fit-your-needs -->
3+
<meta name="twitter:site" content="@{{ site.twitter_username }}">
4+
{% if page.author_twitter %}
5+
<meta name="twitter:creator" content="@{{ page.author_twitter }}">
6+
{% endif %}
7+
<meta name="twitter:title" content="{{ page.title }}">
8+
9+
{% if page.summary %}
10+
<meta name="twitter:description" content="{{ page.summary }}">
11+
{% else %}
12+
<meta name="twitter:description" content="{{ site.description }}">
13+
{% endif %}
14+
15+
{% if page.image %}
16+
<meta name="twitter:card" content="summary_large_image">
17+
<meta name="twitter:image" content="{{ site.url }}{{ page.image }}">
18+
{% else %}
19+
<meta name="twitter:card" content="summary">
20+
<meta name="twitter:image" content="{{ site.title_image }}">
21+
{% endif %}
22+
<!-- end of Twitter cards -->

_posts/2023-08-30-comparing-time-trackers.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
layout: post
33
title: Comparing ActivityWatch with RescueTime, ManicTime, and Apple ScreenTime
4-
date: 2023-08-30 11:24 +0200
4+
date: 2023-08-30 15:55 +0200
55
author: "Erik Bjäreholt"
6+
author_twitter: "ErikBjare"
67
---
78

89
## Introduction

_posts/2023-08-30-future-of-time-tracking.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
layout: post
33
title: "The Future of Time Tracking: AI, Privacy, and Personalization"
4-
date: 2023-08-30 11:52 +0200
4+
date: 2023-08-30 15:57 +0200
55
author: "Erik Bjäreholt"
6+
author_twitter: "ErikBjare"
67
---
78

89
## Introduction

0 commit comments

Comments
 (0)