twitter meta card, category in rss

This commit is contained in:
wgroeneveld 2020-11-25 08:57:24 +01:00
parent f668c77022
commit 017f649c18
2 changed files with 19 additions and 0 deletions

View File

@ -30,9 +30,19 @@
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<comments>{{ .Permalink }}#commento</comments>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
{{ if .Keywords }}
{{ range .Keywords }}
<category>{{ . }}</category>
{{ end }}
{{ else if .Params.tags }}
{{ range .Params.tags }}
<category>{{ . }}</category>
{{ end }}
{{ end }}
<description>
{{ `<![CDATA[ ` | safeHTML }}<img align="left" hspace="5" src="{{ $baseurl }}{{ .Params.image }}"/>

View File

@ -115,3 +115,12 @@
<script data-goatcounter="https://stats.jefklakscodex.com/count"
async src="//stats.jefklakscodex.com/count.js"></script>
{{- end }}
<!-- twitter cards -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ .Title }}">
<meta name="twitter:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}">
{{ if .Params.image }}
<meta name="twitter:image" content="{{ .Params.image | absURL }}">
{{ end }}
<meta name="twitter:image:alt" content="Figure of {{ .Title }}">