1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-24 01:42:10 +00:00

Fix posts description

This commit is contained in:
Rohan Kumar 2022-05-06 10:31:45 -07:00
parent 6f02550253
commit 8579559978
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -11,7 +11,13 @@
{{- printf `<link href="%s" rel="manifest">` $webmanifest.RelPermalink | safeHTML }}
<link rel="alternate" type="application/rss+xml" href="{{ site.BaseURL }}posts/index.xml" title="{{ $.Site.Title }}">
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne $canonicalRelPermalink "/") }} - Seirdy{{ end }}</title>
<meta name="description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
{{ $description := .Site.Params.Description -}}
{{- if .Params.description -}}
{{- $description = .Params.Description -}}
{{- else if eq $canonicalRelPermalink "/posts.html" -}}
{{- $description = "All the posts on Seirdy's Home" -}}
{{- end -}}
<meta name="description" content="{{ $description }}">
<meta name="author" content="{{ .Site.Author.name }}">
<meta property="article:author" content="{{ .Site.Author.name }}">
{{ if gt .Date 0 -}}
@ -56,6 +62,6 @@
<meta property="og:image:height" content="512"><meta property="og:image:width" content="512">
<meta property="og:image:alt" content="White-on-black colon and semicolon">
<meta property="og:url" content="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
<meta property="og:description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
<meta property="og:description" content="{{ $description }}">
{{ hugo.Generator }}
</head>