New meta tags for twitter and mastodon

This commit is contained in:
shockrah 2023-10-07 14:58:50 -07:00
parent 549681cda4
commit 75bbb538a6

View File

@ -3,8 +3,13 @@
<link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/css/style.css"> <link rel="stylesheet" type="text/css" href="/css/style.css">
<link rel="shortcut icon" type="image/png" href="{{ .Site.BaseURL }}/img/favicon.png"> <link rel="shortcut icon" type="image/png" href="{{ .Site.BaseURL }}/img/favicon.png">
<title>{{ default .Params.Title .Site.Params.Title }}</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
{{- /* HTML meta tags */ -}}
<title>{{ default .Params.Title .Site.Params.Title }}</title>
<meta name="description" content="{{ default .Site.Params.Description .Params.Description }}">
{{- /* Facebook meta tags */ -}}
<meta property="og:title" content="{{ default .Site.Title .Params.Title }}"> <meta property="og:title" content="{{ default .Site.Title .Params.Title }}">
<meta property="og:description" content="{{ default .Site.Params.Description .Params.Description }}"> <meta property="og:description" content="{{ default .Site.Params.Description .Params.Description }}">
<meta property="og:site_name" content="{{ .Site.Params.Name }}"> <meta property="og:site_name" content="{{ .Site.Params.Name }}">
@ -15,4 +20,18 @@
{{ else }} {{ else }}
<meta property="og:image" content="/img/bg.png"> <meta property="og:image" content="/img/bg.png">
{{ end }} {{ end }}
{{- /* Twitter meta tags */ -}}
<meta name="twitter:title" content="{{ default .Site.Title .Params.Title }}">
<meta name="twitter:description" content="{{ default .Site.Params.Description .Params.Description }}">
<meta property="twitter:url" content="{{ .Permalink }}">
{{ if .Params.Thumbnail }}
<meta property="twitter:image" content="{{ .Params.Thumbnail }}">
{{ else }}
<meta property="twitter:image" content="/img/bg.png">
{{ end }}
{{- /* Requirements special to twitter, just don't touch these tbh */ -}}
{{- /* https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary-card-with-large-image */ -}}
<meta property="twitter:domain" content="temper.tv">
<meta name="twitter:card" content="summary_large_image">
</head> </head>