1
Fork 0

Add reading time to meta tags

This commit is contained in:
Jake Howard 2021-03-13 21:22:41 +00:00
parent d095bc3a08
commit 0bfe26827d
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -21,6 +21,11 @@
<meta name="twitter:description" content="{{ .Summary | plainify | chomp | htmlUnescape }}{{ if .Truncated }}...{{ end }}" />
<meta name="twitter:creator" content="{{ .Site.Data.social.accounts.twitter.username }}" />
{{ if gt .ReadingTime 2 }}
<meta name="twitter:label1" content="Reading time" />
<meta name="twitter:data1" content="{{ .ReadingTime }} min read" />
{{ end }}
{{ if $image }}
<meta name="twitter:image" content="{{ absURL $image }}" />
<meta name="twitter:image:alt" content="{{ .Title | htmlUnescape }}" />