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

Fix overly long meta descriptions

This commit is contained in:
Rohan Kumar 2022-10-24 12:27:19 -07:00
parent 8358d7ac27
commit 28a29078d5
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 2 additions and 2 deletions

View file

@ -111,7 +111,7 @@ disableKinds = ["taxonomy", "term"]
baseName="atom"
isPlainText = true
mediaType = "application/xml"
[outputformats.html]
mediaType = "application/xhtml+xml"

View file

@ -42,7 +42,7 @@
{{- else if .IsHome -}}
{{- $description = .Site.Params.Description -}}
{{- else if .Summary -}}
{{- $description = .Summary | replaceRE `\n` ` ` | replaceRE `\’` `` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `` | safeHTML -}}
{{- $description = .Summary | replaceRE `\n` ` ` | replaceRE `\’` `` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `` | truncate 160 | replaceRE ` ([^ ]*)?$` `` | safeHTML -}}
{{- end -}}
<meta name="description" content="{{ $description }}" />
<meta name="author" content="{{ .Site.Author.name }}" />